1
0
mirror of https://github.com/cp6/my-idlers.git synced 2024-11-16 23:42:32 +01:00
my-idlers/node_modules/adjust-sourcemap-loader/codec/webpack-bootstrap.js
cp6 fd22b0bf58 V2 (Laravel re-make)
V2 (Laravel re-make)
2022-03-06 02:02:12 +11:00

22 lines
505 B
JavaScript
Vendored

'use strict';
/**
* Codec for webpack generated bootstrap code.
* @type {{name:string, decode:function, abstract:boolean}}
*/
module.exports = {
name : 'webpackBootstrap',
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 /^webpack\/bootstrap\s+\w{20}$/.test(uri);
}