mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Add build-declaration and build-demo scripts to ci script.
This commit is contained in:
parent
78ffa5d39d
commit
5395b1aedc
2 changed files with 549 additions and 162 deletions
|
@ -18,7 +18,7 @@ if (!util.promisify) {
|
|||
};
|
||||
}
|
||||
|
||||
},{"util":72}],2:[function(require,module,exports){
|
||||
},{"util":74}],2:[function(require,module,exports){
|
||||
// @ts-check
|
||||
"use strict";
|
||||
var os = require("os");
|
||||
|
@ -677,7 +677,7 @@ module.exports.applyFixes = function applyFixes(input, errors) {
|
|||
return lines.filter(function (line) { return line !== null; }).join(lineEnding);
|
||||
};
|
||||
|
||||
},{"os":67}],3:[function(require,module,exports){
|
||||
},{"os":69}],3:[function(require,module,exports){
|
||||
// @ts-check
|
||||
"use strict";
|
||||
var lineMetadata = null;
|
||||
|
@ -1663,7 +1663,7 @@ markdownlint.promises = {
|
|||
};
|
||||
module.exports = markdownlint;
|
||||
|
||||
},{"../helpers":2,"../package.json":50,"./cache":3,"./rules":49,"fs":53,"markdown-it":1,"path":68,"util":72}],5:[function(require,module,exports){
|
||||
},{"../helpers":2,"../package.json":50,"./cache":3,"./rules":49,"fs":53,"markdown-it":1,"path":70,"util":74}],5:[function(require,module,exports){
|
||||
// @ts-check
|
||||
"use strict";
|
||||
var _a = require("../helpers"), addErrorDetailIf = _a.addErrorDetailIf, filterTokens = _a.filterTokens;
|
||||
|
@ -3517,11 +3517,11 @@ module.exports={
|
|||
"bugs": "https://github.com/DavidAnson/markdownlint/issues",
|
||||
"scripts": {
|
||||
"test": "tape test/markdownlint-test.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js",
|
||||
"test-cover": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 tape test/markdownlint-test.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js",
|
||||
"test-cover": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 npm test",
|
||||
"test-declaration": "cd example/typescript && tsc && node type-check.js",
|
||||
"test-extra": "node test/markdownlint-test-extra.js",
|
||||
"lint": "eslint --max-warnings 0 lib helpers test schema && eslint --env browser --global markdownit --global markdownlint --rule \"no-unused-vars: 0, no-extend-native: 0, max-statements: 0, no-console: 0, no-var: 0, unicorn/prefer-add-event-listener: 0, unicorn/prefer-query-selector: 0, unicorn/prefer-replace-all: 0\" demo && eslint --rule \"no-console: 0, no-invalid-this: 0, no-shadow: 0, object-property-newline: 0, node/no-missing-require: 0, node/no-extraneous-require: 0\" example",
|
||||
"ci": "npm run test-cover && npm run lint && npm run test-declaration",
|
||||
"lint": "eslint --max-warnings 0 .",
|
||||
"ci": "npm run test-cover && npm run lint && npm run build-declaration && npm run test-declaration && npm run build-config-schema && npm run build-demo && git diff --exit-code",
|
||||
"build-config-schema": "node schema/build-config-schema.js",
|
||||
"build-declaration": "tsc --allowJs --declaration --emitDeclarationOnly --resolveJsonModule lib/markdownlint.js && rimraf 'lib/{c,md,r}*.d.ts' 'helpers/*.d.ts'",
|
||||
"build-demo": "cpy node_modules/markdown-it/dist/markdown-it.min.js demo && cd demo && rimraf markdownlint-browser.* && cpy file-header.js . --rename=markdownlint-browser.js && tsc --allowJs --resolveJsonModule --outDir ../lib-es3 ../lib/markdownlint.js && cpy ../helpers/package.json ../lib-es3/helpers && browserify ../lib-es3/lib/markdownlint.js --standalone markdownlint >> markdownlint-browser.js && browserify ../lib-es3/helpers/helpers.js --standalone helpers >> markdownlint-rule-helpers-browser.js && uglifyjs markdownlint-browser.js markdownlint-rule-helpers-browser.js --compress --mangle --comments --output markdownlint-browser.min.js",
|
||||
|
@ -3632,15 +3632,80 @@ module.exports = function availableTypedArrays() {
|
|||
},{}],54:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var callBind = require('./');
|
||||
|
||||
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
||||
|
||||
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
||||
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
||||
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
||||
return callBind(intrinsic);
|
||||
}
|
||||
return intrinsic;
|
||||
};
|
||||
|
||||
},{"./":55,"get-intrinsic":61}],55:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var bind = require('function-bind');
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
||||
var $call = GetIntrinsic('%Function.prototype.call%');
|
||||
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
||||
|
||||
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
||||
|
||||
if ($defineProperty) {
|
||||
try {
|
||||
$defineProperty({}, 'a', { value: 1 });
|
||||
} catch (e) {
|
||||
// IE 8 has a broken defineProperty
|
||||
$defineProperty = null;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function callBind() {
|
||||
return $reflectApply(bind, $call, arguments);
|
||||
};
|
||||
|
||||
var applyBind = function applyBind() {
|
||||
return $reflectApply(bind, $apply, arguments);
|
||||
};
|
||||
|
||||
if ($defineProperty) {
|
||||
$defineProperty(module.exports, 'apply', { value: applyBind });
|
||||
} else {
|
||||
module.exports.apply = applyBind;
|
||||
}
|
||||
|
||||
},{"function-bind":60,"get-intrinsic":61}],56:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
/* globals
|
||||
AggregateError,
|
||||
Atomics,
|
||||
FinalizationRegistry,
|
||||
SharedArrayBuffer,
|
||||
WeakRef,
|
||||
*/
|
||||
|
||||
var undefined;
|
||||
|
||||
var $SyntaxError = SyntaxError;
|
||||
var $Function = Function;
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
var getEvalledConstructor = function (expressionSyntax) {
|
||||
try {
|
||||
// eslint-disable-next-line no-new-func
|
||||
return Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
||||
} catch (e) {}
|
||||
};
|
||||
|
||||
var $gOPD = Object.getOwnPropertyDescriptor;
|
||||
if ($gOPD) {
|
||||
try {
|
||||
|
@ -3672,129 +3737,137 @@ var hasSymbols = require('has-symbols')();
|
|||
|
||||
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
||||
|
||||
var generator; // = function * () {};
|
||||
var generatorFunction = generator ? getProto(generator) : undefined;
|
||||
var asyncFn; // async function() {};
|
||||
var asyncFunction = asyncFn ? asyncFn.constructor : undefined;
|
||||
var asyncGen; // async function * () {};
|
||||
var asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined;
|
||||
var asyncGenIterator = asyncGen ? asyncGen() : undefined;
|
||||
var asyncGenFunction = getEvalledConstructor('async function* () {}');
|
||||
var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;
|
||||
var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;
|
||||
|
||||
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
|
||||
|
||||
var INTRINSICS = {
|
||||
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
||||
'%Array%': Array,
|
||||
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
||||
'%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,
|
||||
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
|
||||
'%ArrayPrototype%': Array.prototype,
|
||||
'%ArrayProto_entries%': Array.prototype.entries,
|
||||
'%ArrayProto_forEach%': Array.prototype.forEach,
|
||||
'%ArrayProto_keys%': Array.prototype.keys,
|
||||
'%ArrayProto_values%': Array.prototype.values,
|
||||
'%AsyncFromSyncIteratorPrototype%': undefined,
|
||||
'%AsyncFunction%': asyncFunction,
|
||||
'%AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,
|
||||
'%AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined,
|
||||
'%AsyncFunction%': getEvalledConstructor('async function () {}'),
|
||||
'%AsyncGenerator%': asyncGenFunctionPrototype,
|
||||
'%AsyncGeneratorFunction%': asyncGenFunction,
|
||||
'%AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined,
|
||||
'%AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined,
|
||||
'%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,
|
||||
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
||||
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
||||
'%Boolean%': Boolean,
|
||||
'%BooleanPrototype%': Boolean.prototype,
|
||||
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
||||
'%DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,
|
||||
'%Date%': Date,
|
||||
'%DatePrototype%': Date.prototype,
|
||||
'%decodeURI%': decodeURI,
|
||||
'%decodeURIComponent%': decodeURIComponent,
|
||||
'%encodeURI%': encodeURI,
|
||||
'%encodeURIComponent%': encodeURIComponent,
|
||||
'%Error%': Error,
|
||||
'%ErrorPrototype%': Error.prototype,
|
||||
'%eval%': eval, // eslint-disable-line no-eval
|
||||
'%EvalError%': EvalError,
|
||||
'%EvalErrorPrototype%': EvalError.prototype,
|
||||
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
|
||||
'%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,
|
||||
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
|
||||
'%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,
|
||||
'%Function%': Function,
|
||||
'%FunctionPrototype%': Function.prototype,
|
||||
'%Generator%': generator ? getProto(generator()) : undefined,
|
||||
'%GeneratorFunction%': generatorFunction,
|
||||
'%GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined,
|
||||
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
|
||||
'%Function%': $Function,
|
||||
'%GeneratorFunction%': getEvalledConstructor('function* () {}'),
|
||||
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
|
||||
'%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,
|
||||
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
|
||||
'%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,
|
||||
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
|
||||
'%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,
|
||||
'%isFinite%': isFinite,
|
||||
'%isNaN%': isNaN,
|
||||
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
||||
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
|
||||
'%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined,
|
||||
'%Map%': typeof Map === 'undefined' ? undefined : Map,
|
||||
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
|
||||
'%MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,
|
||||
'%Math%': Math,
|
||||
'%Number%': Number,
|
||||
'%NumberPrototype%': Number.prototype,
|
||||
'%Object%': Object,
|
||||
'%ObjectPrototype%': Object.prototype,
|
||||
'%ObjProto_toString%': Object.prototype.toString,
|
||||
'%ObjProto_valueOf%': Object.prototype.valueOf,
|
||||
'%parseFloat%': parseFloat,
|
||||
'%parseInt%': parseInt,
|
||||
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
|
||||
'%PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,
|
||||
'%PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,
|
||||
'%Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,
|
||||
'%Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,
|
||||
'%Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,
|
||||
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
|
||||
'%RangeError%': RangeError,
|
||||
'%RangeErrorPrototype%': RangeError.prototype,
|
||||
'%ReferenceError%': ReferenceError,
|
||||
'%ReferenceErrorPrototype%': ReferenceError.prototype,
|
||||
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
||||
'%RegExp%': RegExp,
|
||||
'%RegExpPrototype%': RegExp.prototype,
|
||||
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
||||
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
|
||||
'%SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,
|
||||
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
|
||||
'%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,
|
||||
'%String%': String,
|
||||
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
|
||||
'%StringPrototype%': String.prototype,
|
||||
'%Symbol%': hasSymbols ? Symbol : undefined,
|
||||
'%SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,
|
||||
'%SyntaxError%': SyntaxError,
|
||||
'%SyntaxErrorPrototype%': SyntaxError.prototype,
|
||||
'%SyntaxError%': $SyntaxError,
|
||||
'%ThrowTypeError%': ThrowTypeError,
|
||||
'%TypedArray%': TypedArray,
|
||||
'%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,
|
||||
'%TypeError%': $TypeError,
|
||||
'%TypeErrorPrototype%': $TypeError.prototype,
|
||||
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
|
||||
'%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,
|
||||
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
|
||||
'%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,
|
||||
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
|
||||
'%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,
|
||||
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
|
||||
'%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,
|
||||
'%URIError%': URIError,
|
||||
'%URIErrorPrototype%': URIError.prototype,
|
||||
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
|
||||
'%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,
|
||||
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,
|
||||
'%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype
|
||||
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
|
||||
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
|
||||
};
|
||||
|
||||
var LEGACY_ALIASES = {
|
||||
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
||||
'%ArrayPrototype%': ['Array', 'prototype'],
|
||||
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
||||
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
||||
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
||||
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
||||
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
||||
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
||||
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
||||
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
||||
'%DataViewPrototype%': ['DataView', 'prototype'],
|
||||
'%DatePrototype%': ['Date', 'prototype'],
|
||||
'%ErrorPrototype%': ['Error', 'prototype'],
|
||||
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
||||
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
||||
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
||||
'%FunctionPrototype%': ['Function', 'prototype'],
|
||||
'%Generator%': ['GeneratorFunction', 'prototype'],
|
||||
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
||||
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
||||
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
||||
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
||||
'%JSONParse%': ['JSON', 'parse'],
|
||||
'%JSONStringify%': ['JSON', 'stringify'],
|
||||
'%MapPrototype%': ['Map', 'prototype'],
|
||||
'%NumberPrototype%': ['Number', 'prototype'],
|
||||
'%ObjectPrototype%': ['Object', 'prototype'],
|
||||
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
||||
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
||||
'%PromisePrototype%': ['Promise', 'prototype'],
|
||||
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
||||
'%Promise_all%': ['Promise', 'all'],
|
||||
'%Promise_reject%': ['Promise', 'reject'],
|
||||
'%Promise_resolve%': ['Promise', 'resolve'],
|
||||
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
||||
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
||||
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
||||
'%SetPrototype%': ['Set', 'prototype'],
|
||||
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
||||
'%StringPrototype%': ['String', 'prototype'],
|
||||
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
||||
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
||||
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
||||
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
||||
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
||||
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
||||
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
||||
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
||||
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
||||
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
||||
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
||||
};
|
||||
|
||||
var bind = require('function-bind');
|
||||
var hasOwn = require('has');
|
||||
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);
|
||||
|
||||
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
||||
|
@ -3803,41 +3876,75 @@ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths.
|
|||
var stringToPath = function stringToPath(string) {
|
||||
var result = [];
|
||||
$replace(string, rePropName, function (match, number, quote, subString) {
|
||||
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : (number || match);
|
||||
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
||||
});
|
||||
return result;
|
||||
};
|
||||
/* end adaptation */
|
||||
|
||||
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
||||
if (!(name in INTRINSICS)) {
|
||||
throw new SyntaxError('intrinsic ' + name + ' does not exist!');
|
||||
var intrinsicName = name;
|
||||
var alias;
|
||||
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
||||
alias = LEGACY_ALIASES[intrinsicName];
|
||||
intrinsicName = '%' + alias[0] + '%';
|
||||
}
|
||||
|
||||
// istanbul ignore if // hopefully this is impossible to test :-)
|
||||
if (typeof INTRINSICS[name] === 'undefined' && !allowMissing) {
|
||||
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
||||
if (hasOwn(INTRINSICS, intrinsicName)) {
|
||||
var value = INTRINSICS[intrinsicName];
|
||||
if (typeof value === 'undefined' && !allowMissing) {
|
||||
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
||||
}
|
||||
|
||||
return {
|
||||
alias: alias,
|
||||
name: intrinsicName,
|
||||
value: value
|
||||
};
|
||||
}
|
||||
|
||||
return INTRINSICS[name];
|
||||
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
||||
};
|
||||
|
||||
module.exports = function GetIntrinsic(name, allowMissing) {
|
||||
if (typeof name !== 'string' || name.length === 0) {
|
||||
throw new TypeError('intrinsic name must be a non-empty string');
|
||||
throw new $TypeError('intrinsic name must be a non-empty string');
|
||||
}
|
||||
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
||||
throw new TypeError('"allowMissing" argument must be a boolean');
|
||||
throw new $TypeError('"allowMissing" argument must be a boolean');
|
||||
}
|
||||
|
||||
var parts = stringToPath(name);
|
||||
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
||||
|
||||
var value = getBaseIntrinsic('%' + (parts.length > 0 ? parts[0] : '') + '%', allowMissing);
|
||||
for (var i = 1; i < parts.length; i += 1) {
|
||||
if (value != null) {
|
||||
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
||||
var intrinsicRealName = intrinsic.name;
|
||||
var value = intrinsic.value;
|
||||
var skipFurtherCaching = false;
|
||||
|
||||
var alias = intrinsic.alias;
|
||||
if (alias) {
|
||||
intrinsicBaseName = alias[0];
|
||||
$spliceApply(parts, $concat([0, 1], alias));
|
||||
}
|
||||
|
||||
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
||||
var part = parts[i];
|
||||
if (part === 'constructor' || !isOwn) {
|
||||
skipFurtherCaching = true;
|
||||
}
|
||||
|
||||
intrinsicBaseName += '.' + part;
|
||||
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
||||
|
||||
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
||||
value = INTRINSICS[intrinsicRealName];
|
||||
} else if (value != null) {
|
||||
if ($gOPD && (i + 1) >= parts.length) {
|
||||
var desc = $gOPD(value, parts[i]);
|
||||
if (!allowMissing && !(parts[i] in value)) {
|
||||
var desc = $gOPD(value, part);
|
||||
isOwn = !!desc;
|
||||
|
||||
if (!allowMissing && !(part in value)) {
|
||||
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
||||
}
|
||||
// By convention, when a data property is converted to an accessor
|
||||
|
@ -3847,69 +3954,25 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|||
// uphold the illusion by pretending to see that original data
|
||||
// property, i.e., returning the value rather than the getter
|
||||
// itself.
|
||||
value = desc && 'get' in desc && !('originalValue' in desc.get) ? desc.get : value[parts[i]];
|
||||
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
||||
value = desc.get;
|
||||
} else {
|
||||
value = value[part];
|
||||
}
|
||||
} else {
|
||||
value = value[parts[i]];
|
||||
isOwn = hasOwn(value, part);
|
||||
value = value[part];
|
||||
}
|
||||
|
||||
if (isOwn && !skipFurtherCaching) {
|
||||
INTRINSICS[intrinsicRealName] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
},{"function-bind":60,"has-symbols":61}],55:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var bind = require('function-bind');
|
||||
|
||||
var GetIntrinsic = require('../GetIntrinsic');
|
||||
|
||||
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
||||
var $call = GetIntrinsic('%Function.prototype.call%');
|
||||
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
||||
|
||||
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
||||
|
||||
if ($defineProperty) {
|
||||
try {
|
||||
$defineProperty({}, 'a', { value: 1 });
|
||||
} catch (e) {
|
||||
// IE 8 has a broken defineProperty
|
||||
$defineProperty = null;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function callBind() {
|
||||
return $reflectApply(bind, $call, arguments);
|
||||
};
|
||||
|
||||
var applyBind = function applyBind() {
|
||||
return $reflectApply(bind, $apply, arguments);
|
||||
};
|
||||
|
||||
if ($defineProperty) {
|
||||
$defineProperty(module.exports, 'apply', { value: applyBind });
|
||||
} else {
|
||||
module.exports.apply = applyBind;
|
||||
}
|
||||
|
||||
},{"../GetIntrinsic":54,"function-bind":60}],56:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('../GetIntrinsic');
|
||||
|
||||
var callBind = require('./callBind');
|
||||
|
||||
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
||||
|
||||
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
||||
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
||||
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.')) {
|
||||
return callBind(intrinsic);
|
||||
}
|
||||
return intrinsic;
|
||||
};
|
||||
|
||||
},{"../GetIntrinsic":54,"./callBind":55}],57:[function(require,module,exports){
|
||||
},{"function-bind":60,"has":64,"has-symbols":62}],57:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('../GetIntrinsic');
|
||||
|
@ -3926,7 +3989,7 @@ if ($gOPD) {
|
|||
|
||||
module.exports = $gOPD;
|
||||
|
||||
},{"../GetIntrinsic":54}],58:[function(require,module,exports){
|
||||
},{"../GetIntrinsic":56}],58:[function(require,module,exports){
|
||||
|
||||
var hasOwn = Object.prototype.hasOwnProperty;
|
||||
var toString = Object.prototype.toString;
|
||||
|
@ -4012,6 +4075,321 @@ var implementation = require('./implementation');
|
|||
module.exports = Function.prototype.bind || implementation;
|
||||
|
||||
},{"./implementation":59}],61:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
/* globals
|
||||
AggregateError,
|
||||
Atomics,
|
||||
FinalizationRegistry,
|
||||
SharedArrayBuffer,
|
||||
WeakRef,
|
||||
*/
|
||||
|
||||
var undefined;
|
||||
|
||||
var $SyntaxError = SyntaxError;
|
||||
var $Function = Function;
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
var getEvalledConstructor = function (expressionSyntax) {
|
||||
try {
|
||||
// eslint-disable-next-line no-new-func
|
||||
return Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
||||
} catch (e) {}
|
||||
};
|
||||
|
||||
var $gOPD = Object.getOwnPropertyDescriptor;
|
||||
if ($gOPD) {
|
||||
try {
|
||||
$gOPD({}, '');
|
||||
} catch (e) {
|
||||
$gOPD = null; // this is IE 8, which has a broken gOPD
|
||||
}
|
||||
}
|
||||
|
||||
var throwTypeError = function () {
|
||||
throw new $TypeError();
|
||||
};
|
||||
var ThrowTypeError = $gOPD
|
||||
? (function () {
|
||||
try {
|
||||
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
||||
arguments.callee; // IE 8 does not throw here
|
||||
return throwTypeError;
|
||||
} catch (calleeThrows) {
|
||||
try {
|
||||
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
||||
return $gOPD(arguments, 'callee').get;
|
||||
} catch (gOPDthrows) {
|
||||
return throwTypeError;
|
||||
}
|
||||
}
|
||||
}())
|
||||
: throwTypeError;
|
||||
|
||||
var hasSymbols = require('has-symbols')();
|
||||
|
||||
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
||||
|
||||
var asyncGenFunction = getEvalledConstructor('async function* () {}');
|
||||
var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;
|
||||
var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;
|
||||
|
||||
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
|
||||
|
||||
var INTRINSICS = {
|
||||
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
||||
'%Array%': Array,
|
||||
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
||||
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
|
||||
'%AsyncFromSyncIteratorPrototype%': undefined,
|
||||
'%AsyncFunction%': getEvalledConstructor('async function () {}'),
|
||||
'%AsyncGenerator%': asyncGenFunctionPrototype,
|
||||
'%AsyncGeneratorFunction%': asyncGenFunction,
|
||||
'%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,
|
||||
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
||||
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
||||
'%Boolean%': Boolean,
|
||||
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
||||
'%Date%': Date,
|
||||
'%decodeURI%': decodeURI,
|
||||
'%decodeURIComponent%': decodeURIComponent,
|
||||
'%encodeURI%': encodeURI,
|
||||
'%encodeURIComponent%': encodeURIComponent,
|
||||
'%Error%': Error,
|
||||
'%eval%': eval, // eslint-disable-line no-eval
|
||||
'%EvalError%': EvalError,
|
||||
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
|
||||
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
|
||||
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
|
||||
'%Function%': $Function,
|
||||
'%GeneratorFunction%': getEvalledConstructor('function* () {}'),
|
||||
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
|
||||
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
|
||||
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
|
||||
'%isFinite%': isFinite,
|
||||
'%isNaN%': isNaN,
|
||||
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
||||
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
|
||||
'%Map%': typeof Map === 'undefined' ? undefined : Map,
|
||||
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
|
||||
'%Math%': Math,
|
||||
'%Number%': Number,
|
||||
'%Object%': Object,
|
||||
'%parseFloat%': parseFloat,
|
||||
'%parseInt%': parseInt,
|
||||
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
|
||||
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
|
||||
'%RangeError%': RangeError,
|
||||
'%ReferenceError%': ReferenceError,
|
||||
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
||||
'%RegExp%': RegExp,
|
||||
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
||||
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
|
||||
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
|
||||
'%String%': String,
|
||||
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
|
||||
'%Symbol%': hasSymbols ? Symbol : undefined,
|
||||
'%SyntaxError%': $SyntaxError,
|
||||
'%ThrowTypeError%': ThrowTypeError,
|
||||
'%TypedArray%': TypedArray,
|
||||
'%TypeError%': $TypeError,
|
||||
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
|
||||
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
|
||||
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
|
||||
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
|
||||
'%URIError%': URIError,
|
||||
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
|
||||
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
|
||||
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
|
||||
};
|
||||
|
||||
var LEGACY_ALIASES = {
|
||||
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
||||
'%ArrayPrototype%': ['Array', 'prototype'],
|
||||
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
||||
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
||||
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
||||
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
||||
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
||||
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
||||
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
||||
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
||||
'%DataViewPrototype%': ['DataView', 'prototype'],
|
||||
'%DatePrototype%': ['Date', 'prototype'],
|
||||
'%ErrorPrototype%': ['Error', 'prototype'],
|
||||
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
||||
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
||||
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
||||
'%FunctionPrototype%': ['Function', 'prototype'],
|
||||
'%Generator%': ['GeneratorFunction', 'prototype'],
|
||||
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
||||
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
||||
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
||||
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
||||
'%JSONParse%': ['JSON', 'parse'],
|
||||
'%JSONStringify%': ['JSON', 'stringify'],
|
||||
'%MapPrototype%': ['Map', 'prototype'],
|
||||
'%NumberPrototype%': ['Number', 'prototype'],
|
||||
'%ObjectPrototype%': ['Object', 'prototype'],
|
||||
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
||||
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
||||
'%PromisePrototype%': ['Promise', 'prototype'],
|
||||
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
||||
'%Promise_all%': ['Promise', 'all'],
|
||||
'%Promise_reject%': ['Promise', 'reject'],
|
||||
'%Promise_resolve%': ['Promise', 'resolve'],
|
||||
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
||||
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
||||
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
||||
'%SetPrototype%': ['Set', 'prototype'],
|
||||
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
||||
'%StringPrototype%': ['String', 'prototype'],
|
||||
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
||||
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
||||
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
||||
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
||||
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
||||
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
||||
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
||||
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
||||
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
||||
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
||||
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
||||
};
|
||||
|
||||
var bind = require('function-bind');
|
||||
var hasOwn = require('has');
|
||||
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);
|
||||
|
||||
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
||||
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
||||
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
||||
var stringToPath = function stringToPath(string) {
|
||||
var first = $strSlice(string, 0, 1);
|
||||
var last = $strSlice(string, -1);
|
||||
if (first === '%' && last !== '%') {
|
||||
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
||||
} else if (last === '%' && first !== '%') {
|
||||
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
||||
}
|
||||
var result = [];
|
||||
$replace(string, rePropName, function (match, number, quote, subString) {
|
||||
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
||||
});
|
||||
return result;
|
||||
};
|
||||
/* end adaptation */
|
||||
|
||||
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
||||
var intrinsicName = name;
|
||||
var alias;
|
||||
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
||||
alias = LEGACY_ALIASES[intrinsicName];
|
||||
intrinsicName = '%' + alias[0] + '%';
|
||||
}
|
||||
|
||||
if (hasOwn(INTRINSICS, intrinsicName)) {
|
||||
var value = INTRINSICS[intrinsicName];
|
||||
if (typeof value === 'undefined' && !allowMissing) {
|
||||
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
||||
}
|
||||
|
||||
return {
|
||||
alias: alias,
|
||||
name: intrinsicName,
|
||||
value: value
|
||||
};
|
||||
}
|
||||
|
||||
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
||||
};
|
||||
|
||||
module.exports = function GetIntrinsic(name, allowMissing) {
|
||||
if (typeof name !== 'string' || name.length === 0) {
|
||||
throw new $TypeError('intrinsic name must be a non-empty string');
|
||||
}
|
||||
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
||||
throw new $TypeError('"allowMissing" argument must be a boolean');
|
||||
}
|
||||
|
||||
var parts = stringToPath(name);
|
||||
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
||||
|
||||
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
||||
var intrinsicRealName = intrinsic.name;
|
||||
var value = intrinsic.value;
|
||||
var skipFurtherCaching = false;
|
||||
|
||||
var alias = intrinsic.alias;
|
||||
if (alias) {
|
||||
intrinsicBaseName = alias[0];
|
||||
$spliceApply(parts, $concat([0, 1], alias));
|
||||
}
|
||||
|
||||
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
||||
var part = parts[i];
|
||||
var first = $strSlice(part, 0, 1);
|
||||
var last = $strSlice(part, -1);
|
||||
if (
|
||||
(
|
||||
(first === '"' || first === "'" || first === '`')
|
||||
|| (last === '"' || last === "'" || last === '`')
|
||||
)
|
||||
&& first !== last
|
||||
) {
|
||||
throw new $SyntaxError('property names with quotes must have matching quotes');
|
||||
}
|
||||
if (part === 'constructor' || !isOwn) {
|
||||
skipFurtherCaching = true;
|
||||
}
|
||||
|
||||
intrinsicBaseName += '.' + part;
|
||||
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
||||
|
||||
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
||||
value = INTRINSICS[intrinsicRealName];
|
||||
} else if (value != null) {
|
||||
if (!(part in value)) {
|
||||
if (!allowMissing) {
|
||||
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
||||
}
|
||||
return void undefined;
|
||||
}
|
||||
if ($gOPD && (i + 1) >= parts.length) {
|
||||
var desc = $gOPD(value, part);
|
||||
isOwn = !!desc;
|
||||
|
||||
// By convention, when a data property is converted to an accessor
|
||||
// property to emulate a data property that does not suffer from
|
||||
// the override mistake, that accessor's getter is marked with
|
||||
// an `originalValue` property. Here, when we detect this, we
|
||||
// uphold the illusion by pretending to see that original data
|
||||
// property, i.e., returning the value rather than the getter
|
||||
// itself.
|
||||
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
||||
value = desc.get;
|
||||
} else {
|
||||
value = value[part];
|
||||
}
|
||||
} else {
|
||||
isOwn = hasOwn(value, part);
|
||||
value = value[part];
|
||||
}
|
||||
|
||||
if (isOwn && !skipFurtherCaching) {
|
||||
INTRINSICS[intrinsicRealName] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
},{"function-bind":60,"has":64,"has-symbols":62}],62:[function(require,module,exports){
|
||||
(function (global){(function (){
|
||||
'use strict';
|
||||
|
||||
|
@ -4028,7 +4406,7 @@ module.exports = function hasNativeSymbols() {
|
|||
};
|
||||
|
||||
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
||||
},{"./shams":62}],62:[function(require,module,exports){
|
||||
},{"./shams":63}],63:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
||||
|
@ -4072,7 +4450,14 @@ module.exports = function hasSymbols() {
|
|||
return true;
|
||||
};
|
||||
|
||||
},{}],63:[function(require,module,exports){
|
||||
},{}],64:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var bind = require('function-bind');
|
||||
|
||||
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
|
||||
|
||||
},{"function-bind":60}],65:[function(require,module,exports){
|
||||
if (typeof Object.create === 'function') {
|
||||
// implementation from standard node.js 'util' module
|
||||
module.exports = function inherits(ctor, superCtor) {
|
||||
|
@ -4101,17 +4486,19 @@ if (typeof Object.create === 'function') {
|
|||
}
|
||||
}
|
||||
|
||||
},{}],64:[function(require,module,exports){
|
||||
},{}],66:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
||||
var toStr = Object.prototype.toString;
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $toString = callBound('Object.prototype.toString');
|
||||
|
||||
var isStandardArguments = function isArguments(value) {
|
||||
if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
|
||||
return false;
|
||||
}
|
||||
return toStr.call(value) === '[object Arguments]';
|
||||
return $toString(value) === '[object Arguments]';
|
||||
};
|
||||
|
||||
var isLegacyArguments = function isArguments(value) {
|
||||
|
@ -4122,8 +4509,8 @@ var isLegacyArguments = function isArguments(value) {
|
|||
typeof value === 'object' &&
|
||||
typeof value.length === 'number' &&
|
||||
value.length >= 0 &&
|
||||
toStr.call(value) !== '[object Array]' &&
|
||||
toStr.call(value.callee) === '[object Function]';
|
||||
$toString(value) !== '[object Array]' &&
|
||||
$toString(value.callee) === '[object Function]';
|
||||
};
|
||||
|
||||
var supportsStandardArguments = (function () {
|
||||
|
@ -4134,7 +4521,7 @@ isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
|
|||
|
||||
module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
|
||||
|
||||
},{}],65:[function(require,module,exports){
|
||||
},{"call-bind/callBound":54}],67:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var toStr = Object.prototype.toString;
|
||||
|
@ -4152,7 +4539,7 @@ var getGeneratorFunc = function () { // eslint-disable-line consistent-return
|
|||
}
|
||||
};
|
||||
var generatorFunc = getGeneratorFunc();
|
||||
var GeneratorFunction = generatorFunc ? getProto(generatorFunc) : {};
|
||||
var GeneratorFunction = getProto && generatorFunc ? getProto(generatorFunc) : false;
|
||||
|
||||
module.exports = function isGeneratorFunction(fn) {
|
||||
if (typeof fn !== 'function') {
|
||||
|
@ -4165,16 +4552,16 @@ module.exports = function isGeneratorFunction(fn) {
|
|||
var str = toStr.call(fn);
|
||||
return str === '[object GeneratorFunction]';
|
||||
}
|
||||
return getProto(fn) === GeneratorFunction;
|
||||
return getProto && getProto(fn) === GeneratorFunction;
|
||||
};
|
||||
|
||||
},{}],66:[function(require,module,exports){
|
||||
},{}],68:[function(require,module,exports){
|
||||
(function (global){(function (){
|
||||
'use strict';
|
||||
|
||||
var forEach = require('foreach');
|
||||
var availableTypedArrays = require('available-typed-arrays');
|
||||
var callBound = require('es-abstract/helpers/callBound');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $toString = callBound('Object.prototype.toString');
|
||||
var hasSymbols = require('has-symbols')();
|
||||
|
@ -4233,7 +4620,7 @@ module.exports = function isTypedArray(value) {
|
|||
};
|
||||
|
||||
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
||||
},{"available-typed-arrays":52,"es-abstract/helpers/callBound":56,"es-abstract/helpers/getOwnPropertyDescriptor":57,"foreach":58,"has-symbols":61}],67:[function(require,module,exports){
|
||||
},{"available-typed-arrays":52,"call-bind/callBound":54,"es-abstract/helpers/getOwnPropertyDescriptor":57,"foreach":58,"has-symbols":62}],69:[function(require,module,exports){
|
||||
exports.endianness = function () { return 'LE' };
|
||||
|
||||
exports.hostname = function () {
|
||||
|
@ -4284,7 +4671,7 @@ exports.homedir = function () {
|
|||
return '/'
|
||||
};
|
||||
|
||||
},{}],68:[function(require,module,exports){
|
||||
},{}],70:[function(require,module,exports){
|
||||
(function (process){(function (){
|
||||
// 'path' module extracted from Node.js v8.11.1 (only the posix part)
|
||||
// transplited with Babel
|
||||
|
@ -4817,7 +5204,7 @@ posix.posix = posix;
|
|||
module.exports = posix;
|
||||
|
||||
}).call(this)}).call(this,require('_process'))
|
||||
},{"_process":69}],69:[function(require,module,exports){
|
||||
},{"_process":71}],71:[function(require,module,exports){
|
||||
// shim for using process in browser
|
||||
var process = module.exports = {};
|
||||
|
||||
|
@ -5003,14 +5390,14 @@ process.chdir = function (dir) {
|
|||
};
|
||||
process.umask = function() { return 0; };
|
||||
|
||||
},{}],70:[function(require,module,exports){
|
||||
},{}],72:[function(require,module,exports){
|
||||
module.exports = function isBuffer(arg) {
|
||||
return arg && typeof arg === 'object'
|
||||
&& typeof arg.copy === 'function'
|
||||
&& typeof arg.fill === 'function'
|
||||
&& typeof arg.readUInt8 === 'function';
|
||||
}
|
||||
},{}],71:[function(require,module,exports){
|
||||
},{}],73:[function(require,module,exports){
|
||||
// Currently in sync with Node.js lib/internal/util/types.js
|
||||
// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9
|
||||
|
||||
|
@ -5344,7 +5731,7 @@ exports.isAnyArrayBuffer = isAnyArrayBuffer;
|
|||
});
|
||||
});
|
||||
|
||||
},{"is-arguments":64,"is-generator-function":65,"is-typed-array":66,"which-typed-array":73}],72:[function(require,module,exports){
|
||||
},{"is-arguments":66,"is-generator-function":67,"is-typed-array":68,"which-typed-array":75}],74:[function(require,module,exports){
|
||||
(function (process){(function (){
|
||||
// Copyright Joyent, Inc. and other Node contributors.
|
||||
//
|
||||
|
@ -6063,13 +6450,13 @@ function callbackify(original) {
|
|||
exports.callbackify = callbackify;
|
||||
|
||||
}).call(this)}).call(this,require('_process'))
|
||||
},{"./support/isBuffer":70,"./support/types":71,"_process":69,"inherits":63}],73:[function(require,module,exports){
|
||||
},{"./support/isBuffer":72,"./support/types":73,"_process":71,"inherits":65}],75:[function(require,module,exports){
|
||||
(function (global){(function (){
|
||||
'use strict';
|
||||
|
||||
var forEach = require('foreach');
|
||||
var availableTypedArrays = require('available-typed-arrays');
|
||||
var callBound = require('es-abstract/helpers/callBound');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $toString = callBound('Object.prototype.toString');
|
||||
var hasSymbols = require('has-symbols')();
|
||||
|
@ -6123,5 +6510,5 @@ module.exports = function whichTypedArray(value) {
|
|||
};
|
||||
|
||||
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
||||
},{"available-typed-arrays":52,"es-abstract/helpers/callBound":56,"es-abstract/helpers/getOwnPropertyDescriptor":57,"foreach":58,"has-symbols":61,"is-typed-array":66}]},{},[4])(4)
|
||||
},{"available-typed-arrays":52,"call-bind/callBound":54,"es-abstract/helpers/getOwnPropertyDescriptor":57,"foreach":58,"has-symbols":62,"is-typed-array":68}]},{},[4])(4)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue