source: trip-planner-front/node_modules/adjust-sourcemap-loader/codec/bower-component.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 511 bytes
Line 
1'use strict';
2
3/**
4 * Codec for code generated by the Bower plugin.
5 * @type {{name:string, decode:function, abstract:boolean}}
6 */
7module.exports = {
8 name : 'bowerComponent',
9 decode : decode,
10 abstract: true
11};
12
13/**
14 * Validate the given uri (abstract).
15 * @this {{options: object}} A loader or compilation
16 * @param {string} uri A source uri to decode
17 * @returns {boolean|string} False where unmatched else True
18 */
19function decode(uri) {
20 return /^\/?([\w-]+)\s+\(bower component\)$/.test(uri);
21}
Note: See TracBrowser for help on using the repository browser.