mirror of
https://github.com/Azure/setup-helm.git
synced 2025-10-25 03:56:31 +00:00
committed by
GitHub
parent
20d2b4f98d
commit
e4f3964f67
4
node_modules/get-intrinsic/index.js
generated
vendored
4
node_modules/get-intrinsic/index.js
generated
vendored
@@ -202,6 +202,7 @@ var $concat = bind.call(Function.call, Array.prototype.concat);
|
||||
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
||||
var $replace = bind.call(Function.call, String.prototype.replace);
|
||||
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
||||
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
||||
|
||||
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
||||
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
||||
@@ -257,6 +258,9 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
||||
throw new $TypeError('"allowMissing" argument must be a boolean');
|
||||
}
|
||||
|
||||
if ($exec(/^%?[^%]*%?$/g, name) === null) {
|
||||
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
||||
}
|
||||
var parts = stringToPath(name);
|
||||
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user