This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
eternos/frontend/node_modules/adjust-sourcemap-loader/codec/bower-component.js
2025-01-13 09:33:52 +03:00

22 lines
511 B
JavaScript

'use strict';
/**
* Codec for code generated by the Bower plugin.
* @type {{name:string, decode:function, abstract:boolean}}
*/
module.exports = {
name : 'bowerComponent',
decode : decode,
abstract: true
};
/**
* Validate the given uri (abstract).
* @this {{options: object}} A loader or compilation
* @param {string} uri A source uri to decode
* @returns {boolean|string} False where unmatched else True
*/
function decode(uri) {
return /^\/?([\w-]+)\s+\(bower component\)$/.test(uri);
}