first
This commit is contained in:
20
node_modules/object.assign/.editorconfig
generated
vendored
Normal file
20
node_modules/object.assign/.editorconfig
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 150
|
||||
|
||||
[CHANGELOG.md]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.json]
|
||||
max_line_length = off
|
||||
|
||||
[Makefile]
|
||||
max_line_length = off
|
28
node_modules/object.assign/.eslintrc
generated
vendored
Normal file
28
node_modules/object.assign/.eslintrc
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"ignorePatterns": ["dist/"],
|
||||
|
||||
"rules": {
|
||||
"eqeqeq": [2, "allow-null"],
|
||||
"id-length": [2, { "min": 1, "max": 30 }],
|
||||
"max-statements": [2, 33],
|
||||
"max-statements-per-line": [2, { "max": 2 }],
|
||||
"no-magic-numbers": [1, { "ignore": [0] }],
|
||||
"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"no-invalid-this": 1,
|
||||
"max-lines-per-function": 0,
|
||||
"max-statements-per-line": [2, { "max": 3 }],
|
||||
"no-magic-numbers": 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
12
node_modules/object.assign/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/object.assign/.github/FUNDING.yml
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/object.assign
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
9
node_modules/object.assign/.nycrc
generated
vendored
Normal file
9
node_modules/object.assign/.nycrc
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
225
node_modules/object.assign/CHANGELOG.md
generated
vendored
Normal file
225
node_modules/object.assign/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,225 @@
|
||||
4.1.4 / 2022-08-16
|
||||
==================
|
||||
* [meta] fix `npmignore` integration (#83)
|
||||
|
||||
4.1.3 / 2022-08-05
|
||||
==================
|
||||
* [Refactor] make steps closer to actual spec
|
||||
* [Refactor] simplify object coercible check
|
||||
* [readme] remove defunct badges, add coverage and actions badges
|
||||
* [eslint] ignore coverage output
|
||||
* [meta] use `npmignore` to autogenerate an npmignore file
|
||||
* [meta] remove audit-level
|
||||
* [Deps] update `call-bind`, `define-properties`, `has-symbols`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `functions-have-names`, `safe-publish-latest`, `ses`, `tape`
|
||||
* [actions] use `node/install` instead of `node/run`; use `codecov` action
|
||||
* [actions] reuse common workflows
|
||||
* [actions] update codecov uploader
|
||||
* [Tests] add implementation tests
|
||||
* [Tests] use `mock-property`
|
||||
* [Tests] disable posttest pending `aud` handling `file:` deps
|
||||
* [Tests] migrate remaining tests to Github Actions (#81)
|
||||
* [Tests] gitignore coverage output
|
||||
* [Tests] test node v1-v9 on Github Actions instead of travis; resume testing all minors (#80)
|
||||
|
||||
4.1.2 / 2020-10-30
|
||||
==================
|
||||
* [Refactor] use extracted `call-bind` instead of full `es-abstract`
|
||||
* [Dev Deps] update `eslint`, `ses`, `browserify`
|
||||
* [Tests] run tests in SES
|
||||
* [Tests] ses-compat: show error stacks
|
||||
|
||||
4.1.1 / 2020-09-11
|
||||
==================
|
||||
* [Fix] avoid mutating `Object.assign` in modern engines
|
||||
* [Refactor] use `callBind` from `es-abstract` instead of `function-bind`
|
||||
* [Deps] update `has-symbols`, `object-keys`, `define-properties`
|
||||
* [meta] add `funding` field, FUNDING.yml
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `browserify`, `covert`, `for-each`, `is`, `tape`, `functions-have-names`; add `aud`, `safe-publish-latest`; remove `jscs`
|
||||
* [actions] add Require Allow Edits workflow
|
||||
* [actions] add automatic rebasing / merge commit blocking
|
||||
* [Tests] ses-compat - add test to ensure package initializes correctly after ses lockdown (#77)
|
||||
* [Tests] Add passing test for a source of `window.location` (#68)
|
||||
* [Tests] use shared travis-ci config
|
||||
* [Tests] use `npx aud` instead of `npm audit` with hoops or `nsp`
|
||||
* [Tests] use `functions-have-names`
|
||||
|
||||
4.1.0 / 2017-12-21
|
||||
==================
|
||||
* [New] add `auto` entry point (#52)
|
||||
* [Refactor] Use `has-symbols` module
|
||||
* [Deps] update `function-bind`, `object-keys`
|
||||
* [Dev Deps] update `@es-shims/api`, `browserify`, `nsp`, `eslint`, `@ljharb/eslint-config`, `is`
|
||||
* [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS
|
||||
|
||||
4.0.4 / 2016-07-04
|
||||
==================
|
||||
* [Fix] Cache original `getOwnPropertySymbols`, and use that when `Object.getOwnPropertySymbols` is unavailable
|
||||
* [Deps] update `object-keys`
|
||||
* [Dev Deps] update `eslint`, `get-own-property-symbols`, `core-js`, `jscs`, `nsp`, `browserify`, `@ljharb/eslint-config`, `tape`, `@es-shims/api`
|
||||
* [Tests] up to `node` `v6.2`, `v5.10`, `v4.4`
|
||||
* [Tests] run sham tests on node 0.10
|
||||
* [Tests] use pretest/posttest for linting/security
|
||||
|
||||
4.0.3 / 2015-10-21
|
||||
==================
|
||||
* [Fix] Support core-js's Symbol sham (#17)
|
||||
* [Fix] Ensure that properties removed or made non-enumerable during enumeration are not assigned (#16)
|
||||
* [Fix] Avoid looking up keys and values more than once
|
||||
* [Tests] Avoid using `reduce` so `npm run test:shams:corejs` passes in `node` `v0.8` ([core-js#122](https://github.com/zloirock/core-js/issues/122))
|
||||
* [Tests] Refactor to use my conventional structure that separates shimmed, implementation, and common tests
|
||||
* [Tests] Create `npm run test:shams` and better organize tests for symbol shams
|
||||
* [Tests] Remove `nsp` in favor of `requiresafe`
|
||||
|
||||
4.0.2 / 2015-10-20
|
||||
==================
|
||||
* [Fix] Ensure correct property enumeration order, particularly in v8 (#15)
|
||||
* [Deps] update `object-keys`, `define-properties`
|
||||
* [Dev Deps] update `browserify`, `is`, `tape`, `jscs`, `eslint`, `@ljharb/eslint-config`
|
||||
* [Tests] up to `io.js` `v3.3`, `node` `v4.2`
|
||||
|
||||
4.0.1 / 2015-08-16
|
||||
==================
|
||||
* [Docs] Add `Symbol` note to readme
|
||||
|
||||
4.0.0 / 2015-08-15
|
||||
==================
|
||||
* [Breaking] Implement the [es-shim API](es-shims/api).
|
||||
* [Robustness] Make implementation robust against later modification of environment methods.
|
||||
* [Refactor] Move implementation to `implementation.js`
|
||||
* [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG
|
||||
* [Deps] update `object-keys`, `define-properties`
|
||||
* [Dev Deps] update `browserify`, `tape`, `eslint`, `jscs`, `browserify`
|
||||
* [Tests] Add `npm run tests-only`
|
||||
* [Tests] use my personal shared `eslint` config.
|
||||
* [Tests] up to `io.js` `v3.0`
|
||||
|
||||
3.0.1 / 2015-06-28
|
||||
==================
|
||||
* Cache `Object` and `Array#push` to make the shim more robust.
|
||||
* [Fix] Remove use of `Array#filter`, which isn't in ES3.
|
||||
* [Deps] Update `object-keys`, `define-properties`
|
||||
* [Dev Deps] Update `get-own-property-symbols`, `browserify`, `eslint`, `nsp`
|
||||
* [Tests] Test up to `io.js` `v2.3`
|
||||
* [Tests] Adding `Object.assign` tests for non-object targets, per https://github.com/paulmillr/es6-shim/issues/348
|
||||
|
||||
3.0.0 / 2015-05-20
|
||||
==================
|
||||
* Attempt to feature-detect Symbols, even if `typeof Symbol() !== 'symbol'` (#12)
|
||||
* Make a separate `hasSymbols` internal module
|
||||
* Update `browserify`, `eslint`
|
||||
|
||||
2.0.3 / 2015-06-28
|
||||
==================
|
||||
* Cache `Object` and `Array#push` to make the shim more robust.
|
||||
* [Fix] Remove use of `Array#filter`, which isn't in ES3
|
||||
* [Deps] Update `object-keys`, `define-properties`
|
||||
* [Dev Deps] Update `browserify`, `nsp`, `eslint`
|
||||
* [Tests] Test up to `io.js` `v2.3`
|
||||
|
||||
2.0.2 / 2015-05-20
|
||||
==================
|
||||
* Make sure `.shim` is non-enumerable.
|
||||
* Refactor `.shim` implementation to use `define-properties` predicates, rather than `delete`ing the original.
|
||||
* Update docs to match spec/implementation. (#11)
|
||||
* Add `npm run eslint`
|
||||
* Test up to `io.js` `v2.0`
|
||||
* Update `jscs`, `browserify`, `covert`
|
||||
|
||||
2.0.1 / 2015-04-12
|
||||
==================
|
||||
* Make sure non-enumerable Symbols are excluded.
|
||||
|
||||
2.0.0 / 2015-04-12
|
||||
==================
|
||||
* Make sure the shim function overwrites a broken implementation with pending exceptions.
|
||||
* Ensure shim is not enumerable using `define-properties`
|
||||
* Ensure `Object.assign` includes symbols.
|
||||
* All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`.
|
||||
* Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures.
|
||||
* Add `npm run security` via `nsp`
|
||||
* Update `browserify`, `jscs`, `tape`, `object-keys`, `is`
|
||||
|
||||
1.1.1 / 2014-12-14
|
||||
==================
|
||||
* Actually include the browser build in `npm`
|
||||
|
||||
1.1.0 / 2014-12-14
|
||||
==================
|
||||
* Add `npm run build`, and build an automatic-shimming browser distribution as part of the npm publish process.
|
||||
* Update `is`, `jscs`
|
||||
|
||||
1.0.3 / 2014-11-29
|
||||
==================
|
||||
* Revert "optimize --production installs"
|
||||
|
||||
1.0.2 / 2014-11-27
|
||||
==================
|
||||
* Update `jscs`, `is`, `object-keys`, `tape`
|
||||
* Add badges to README
|
||||
* Name URLs in README
|
||||
* Lock `covert` to `v1.0.0`
|
||||
* Optimize --production installs
|
||||
|
||||
1.0.1 / 2014-08-26
|
||||
==================
|
||||
* Update `is`, `covert`
|
||||
|
||||
1.0.0 / 2014-08-07
|
||||
==================
|
||||
* Update `object-keys`, `tape`
|
||||
|
||||
0.5.0 / 2014-07-31
|
||||
==================
|
||||
* Object.assign no longer throws on null or undefined sources, per https://bugs.ecmascript.org/show_bug.cgi?id=3096
|
||||
|
||||
0.4.3 / 2014-07-30
|
||||
==================
|
||||
* Don’t modify vars in the function signature, since it deoptimizes v8
|
||||
|
||||
0.4.2 / 2014-07-30
|
||||
==================
|
||||
* Fixing the version number: v0.4.2
|
||||
|
||||
0.4.1 / 2014-07-19
|
||||
==================
|
||||
* Revert "Use the native Object.keys if it’s available."
|
||||
|
||||
0.4.0 / 2014-07-19
|
||||
==================
|
||||
* Use the native Object.keys if it’s available.
|
||||
* Fixes [#2](https://github.com/ljharb/object.assign/issues/2).
|
||||
* Adding failing tests for [#2](https://github.com/ljharb/object.assign/issues/2).
|
||||
* Fix indentation.
|
||||
* Adding `npm run lint`
|
||||
* Update `tape`, `covert`
|
||||
* README: Use SVG badge for Travis [#1](https://github.com/ljharb/object.assign/issues/1) from mathiasbynens/patch-1
|
||||
|
||||
0.3.1 / 2014-04-10
|
||||
==================
|
||||
* Object.assign does partially modify objects if it throws, per https://twitter.com/awbjs/status/454320863093862400
|
||||
|
||||
0.3.0 / 2014-04-10
|
||||
==================
|
||||
* Update with newest ES6 behavior - Object.assign now takes a variable number of source objects.
|
||||
* Update `tape`
|
||||
* Make sure old and unstable nodes don’t fail Travis
|
||||
|
||||
0.2.1 / 2014-03-16
|
||||
==================
|
||||
* Let object-keys handle the fallback
|
||||
* Update dependency badges
|
||||
* Adding bower.json
|
||||
|
||||
0.2.0 / 2014-03-16
|
||||
==================
|
||||
* Use a for loop, because ES3 browsers don’t have "reduce"
|
||||
|
||||
0.1.1 / 2014-03-14
|
||||
==================
|
||||
* Updating readme
|
||||
|
||||
0.1.0 / 2014-03-14
|
||||
==================
|
||||
* Initial release.
|
||||
|
21
node_modules/object.assign/LICENSE
generated
vendored
Normal file
21
node_modules/object.assign/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
136
node_modules/object.assign/README.md
generated
vendored
Normal file
136
node_modules/object.assign/README.md
generated
vendored
Normal file
@ -0,0 +1,136 @@
|
||||
# object.assign <sup>[![Version Badge][npm-version-svg]][npm-url]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][npm-url]
|
||||
|
||||
An Object.assign shim. Invoke its "shim" method to shim Object.assign if it is unavailable.
|
||||
|
||||
This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s.
|
||||
|
||||
Takes a minimum of 2 arguments: `target` and `source`.
|
||||
Takes a variable sized list of source arguments - at least 1, as many as you want.
|
||||
Throws a TypeError if the `target` argument is `null` or `undefined`.
|
||||
|
||||
Most common usage:
|
||||
```js
|
||||
var assign = require('object.assign').getPolyfill(); // returns native method if compliant
|
||||
/* or */
|
||||
var assign = require('object.assign/polyfill')(); // returns native method if compliant
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var assert = require('assert');
|
||||
|
||||
// Multiple sources!
|
||||
var target = { a: true };
|
||||
var source1 = { b: true };
|
||||
var source2 = { c: true };
|
||||
var sourceN = { n: true };
|
||||
|
||||
var expected = {
|
||||
a: true,
|
||||
b: true,
|
||||
c: true,
|
||||
n: true
|
||||
};
|
||||
|
||||
assign(target, source1, source2, sourceN);
|
||||
assert.deepEqual(target, expected); // AWESOME!
|
||||
```
|
||||
|
||||
```js
|
||||
var target = {
|
||||
a: true,
|
||||
b: true,
|
||||
c: true
|
||||
};
|
||||
var source1 = {
|
||||
c: false,
|
||||
d: false
|
||||
};
|
||||
var sourceN = {
|
||||
e: false
|
||||
};
|
||||
|
||||
var assigned = assign(target, source1, sourceN);
|
||||
assert.equal(target, assigned); // returns the target object
|
||||
assert.deepEqual(assigned, {
|
||||
a: true,
|
||||
b: true,
|
||||
c: false,
|
||||
d: false,
|
||||
e: false
|
||||
});
|
||||
```
|
||||
|
||||
```js
|
||||
/* when Object.assign is not present */
|
||||
delete Object.assign;
|
||||
var shimmedAssign = require('object.assign').shim();
|
||||
/* or */
|
||||
var shimmedAssign = require('object.assign/shim')();
|
||||
|
||||
assert.equal(shimmedAssign, assign);
|
||||
|
||||
var target = {
|
||||
a: true,
|
||||
b: true,
|
||||
c: true
|
||||
};
|
||||
var source = {
|
||||
c: false,
|
||||
d: false,
|
||||
e: false
|
||||
};
|
||||
|
||||
var assigned = assign(target, source);
|
||||
assert.deepEqual(Object.assign(target, source), assign(target, source));
|
||||
```
|
||||
|
||||
```js
|
||||
/* when Object.assign is present */
|
||||
var shimmedAssign = require('object.assign').shim();
|
||||
assert.equal(shimmedAssign, Object.assign);
|
||||
|
||||
var target = {
|
||||
a: true,
|
||||
b: true,
|
||||
c: true
|
||||
};
|
||||
var source = {
|
||||
c: false,
|
||||
d: false,
|
||||
e: false
|
||||
};
|
||||
|
||||
assert.deepEqual(Object.assign(target, source), assign(target, source));
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[npm-url]: https://npmjs.org/package/object.assign
|
||||
[npm-version-svg]: http://versionbadg.es/ljharb/object.assign.svg
|
||||
[travis-svg]: https://travis-ci.org/ljharb/object.assign.svg
|
||||
[travis-url]: https://travis-ci.org/ljharb/object.assign
|
||||
[deps-svg]: https://david-dm.org/ljharb/object.assign.svg?theme=shields.io
|
||||
[deps-url]: https://david-dm.org/ljharb/object.assign
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/object.assign/dev-status.svg?theme=shields.io
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/object.assign#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/object.assign.png?downloads=true&stars=true
|
||||
[license-image]: http://img.shields.io/npm/l/object.assign.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: http://img.shields.io/npm/dm/object.assign.svg
|
||||
[downloads-url]: http://npm-stat.com/charts.html?package=object.assign
|
||||
[codecov-image]: https://codecov.io/gh/ljharb/object.assign/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/ljharb/object.assign/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/object.assign
|
||||
[actions-url]: https://github.com/ljharb/object.assign/actions
|
3
node_modules/object.assign/auto.js
generated
vendored
Normal file
3
node_modules/object.assign/auto.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
require('./shim')();
|
944
node_modules/object.assign/dist/browser.js
generated
vendored
Normal file
944
node_modules/object.assign/dist/browser.js
generated
vendored
Normal file
@ -0,0 +1,944 @@
|
||||
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var keys = require('object-keys').shim();
|
||||
delete keys.shim;
|
||||
|
||||
var assign = require('./');
|
||||
|
||||
module.exports = assign.shim();
|
||||
|
||||
delete assign.shim;
|
||||
|
||||
},{"./":3,"object-keys":15}],2:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
// modified from https://github.com/es-shims/es6-shim
|
||||
var objectKeys = require('object-keys');
|
||||
var hasSymbols = require('has-symbols/shams')();
|
||||
var callBound = require('call-bind/callBound');
|
||||
var toObject = Object;
|
||||
var $push = callBound('Array.prototype.push');
|
||||
var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
|
||||
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
module.exports = function assign(target, source1) {
|
||||
if (target == null) { throw new TypeError('target must be an object'); }
|
||||
var to = toObject(target); // step 1
|
||||
if (arguments.length === 1) {
|
||||
return to; // step 2
|
||||
}
|
||||
for (var s = 1; s < arguments.length; ++s) {
|
||||
var from = toObject(arguments[s]); // step 3.a.i
|
||||
|
||||
// step 3.a.ii:
|
||||
var keys = objectKeys(from);
|
||||
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
|
||||
if (getSymbols) {
|
||||
var syms = getSymbols(from);
|
||||
for (var j = 0; j < syms.length; ++j) {
|
||||
var key = syms[j];
|
||||
if ($propIsEnumerable(from, key)) {
|
||||
$push(keys, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// step 3.a.iii:
|
||||
for (var i = 0; i < keys.length; ++i) {
|
||||
var nextKey = keys[i];
|
||||
if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2
|
||||
var propValue = from[nextKey]; // step 3.a.iii.2.a
|
||||
to[nextKey] = propValue; // step 3.a.iii.2.b
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return to; // step 4
|
||||
};
|
||||
|
||||
},{"call-bind/callBound":4,"has-symbols/shams":12,"object-keys":15}],3:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var defineProperties = require('define-properties');
|
||||
var callBind = require('call-bind');
|
||||
|
||||
var implementation = require('./implementation');
|
||||
var getPolyfill = require('./polyfill');
|
||||
var shim = require('./shim');
|
||||
|
||||
var polyfill = callBind.apply(getPolyfill());
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var bound = function assign(target, source1) {
|
||||
return polyfill(Object, arguments);
|
||||
};
|
||||
|
||||
defineProperties(bound, {
|
||||
getPolyfill: getPolyfill,
|
||||
implementation: implementation,
|
||||
shim: shim
|
||||
});
|
||||
|
||||
module.exports = bound;
|
||||
|
||||
},{"./implementation":2,"./polyfill":17,"./shim":18,"call-bind":5,"define-properties":6}],4:[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;
|
||||
};
|
||||
|
||||
},{"./":5,"get-intrinsic":9}],5:[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 $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
||||
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
||||
var $max = GetIntrinsic('%Math.max%');
|
||||
|
||||
if ($defineProperty) {
|
||||
try {
|
||||
$defineProperty({}, 'a', { value: 1 });
|
||||
} catch (e) {
|
||||
// IE 8 has a broken defineProperty
|
||||
$defineProperty = null;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function callBind(originalFunction) {
|
||||
var func = $reflectApply(bind, $call, arguments);
|
||||
if ($gOPD && $defineProperty) {
|
||||
var desc = $gOPD(func, 'length');
|
||||
if (desc.configurable) {
|
||||
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
||||
$defineProperty(
|
||||
func,
|
||||
'length',
|
||||
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
||||
);
|
||||
}
|
||||
}
|
||||
return func;
|
||||
};
|
||||
|
||||
var applyBind = function applyBind() {
|
||||
return $reflectApply(bind, $apply, arguments);
|
||||
};
|
||||
|
||||
if ($defineProperty) {
|
||||
$defineProperty(module.exports, 'apply', { value: applyBind });
|
||||
} else {
|
||||
module.exports.apply = applyBind;
|
||||
}
|
||||
|
||||
},{"function-bind":8,"get-intrinsic":9}],6:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var keys = require('object-keys');
|
||||
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
||||
|
||||
var toStr = Object.prototype.toString;
|
||||
var concat = Array.prototype.concat;
|
||||
var origDefineProperty = Object.defineProperty;
|
||||
|
||||
var isFunction = function (fn) {
|
||||
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
|
||||
};
|
||||
|
||||
var hasPropertyDescriptors = require('has-property-descriptors')();
|
||||
|
||||
var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
|
||||
|
||||
var defineProperty = function (object, name, value, predicate) {
|
||||
if (name in object && (!isFunction(predicate) || !predicate())) {
|
||||
return;
|
||||
}
|
||||
if (supportsDescriptors) {
|
||||
origDefineProperty(object, name, {
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
value: value,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
object[name] = value; // eslint-disable-line no-param-reassign
|
||||
}
|
||||
};
|
||||
|
||||
var defineProperties = function (object, map) {
|
||||
var predicates = arguments.length > 2 ? arguments[2] : {};
|
||||
var props = keys(map);
|
||||
if (hasSymbols) {
|
||||
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
||||
}
|
||||
for (var i = 0; i < props.length; i += 1) {
|
||||
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
|
||||
}
|
||||
};
|
||||
|
||||
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
||||
|
||||
module.exports = defineProperties;
|
||||
|
||||
},{"has-property-descriptors":10,"object-keys":15}],7:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
/* eslint no-invalid-this: 1 */
|
||||
|
||||
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
||||
var slice = Array.prototype.slice;
|
||||
var toStr = Object.prototype.toString;
|
||||
var funcType = '[object Function]';
|
||||
|
||||
module.exports = function bind(that) {
|
||||
var target = this;
|
||||
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
|
||||
throw new TypeError(ERROR_MESSAGE + target);
|
||||
}
|
||||
var args = slice.call(arguments, 1);
|
||||
|
||||
var bound;
|
||||
var binder = function () {
|
||||
if (this instanceof bound) {
|
||||
var result = target.apply(
|
||||
this,
|
||||
args.concat(slice.call(arguments))
|
||||
);
|
||||
if (Object(result) === result) {
|
||||
return result;
|
||||
}
|
||||
return this;
|
||||
} else {
|
||||
return target.apply(
|
||||
that,
|
||||
args.concat(slice.call(arguments))
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
var boundLength = Math.max(0, target.length - args.length);
|
||||
var boundArgs = [];
|
||||
for (var i = 0; i < boundLength; i++) {
|
||||
boundArgs.push('$' + i);
|
||||
}
|
||||
|
||||
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
||||
|
||||
if (target.prototype) {
|
||||
var Empty = function Empty() {};
|
||||
Empty.prototype = target.prototype;
|
||||
bound.prototype = new Empty();
|
||||
Empty.prototype = null;
|
||||
}
|
||||
|
||||
return bound;
|
||||
};
|
||||
|
||||
},{}],8:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var implementation = require('./implementation');
|
||||
|
||||
module.exports = Function.prototype.bind || implementation;
|
||||
|
||||
},{"./implementation":7}],9:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var undefined;
|
||||
|
||||
var $SyntaxError = SyntaxError;
|
||||
var $Function = Function;
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
var getEvalledConstructor = function (expressionSyntax) {
|
||||
try {
|
||||
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 needsEval = {};
|
||||
|
||||
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%': needsEval,
|
||||
'%AsyncGenerator%': needsEval,
|
||||
'%AsyncGeneratorFunction%': needsEval,
|
||||
'%AsyncIteratorPrototype%': needsEval,
|
||||
'%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%': needsEval,
|
||||
'%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 doEval = function doEval(name) {
|
||||
var value;
|
||||
if (name === '%AsyncFunction%') {
|
||||
value = getEvalledConstructor('async function () {}');
|
||||
} else if (name === '%GeneratorFunction%') {
|
||||
value = getEvalledConstructor('function* () {}');
|
||||
} else if (name === '%AsyncGeneratorFunction%') {
|
||||
value = getEvalledConstructor('async function* () {}');
|
||||
} else if (name === '%AsyncGenerator%') {
|
||||
var fn = doEval('%AsyncGeneratorFunction%');
|
||||
if (fn) {
|
||||
value = fn.prototype;
|
||||
}
|
||||
} else if (name === '%AsyncIteratorPrototype%') {
|
||||
var gen = doEval('%AsyncGenerator%');
|
||||
if (gen) {
|
||||
value = getProto(gen.prototype);
|
||||
}
|
||||
}
|
||||
|
||||
INTRINSICS[name] = value;
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
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 (value === needsEval) {
|
||||
value = doEval(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":8,"has":13,"has-symbols":11}],10:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
||||
|
||||
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
||||
if ($defineProperty) {
|
||||
try {
|
||||
$defineProperty({}, 'a', { value: 1 });
|
||||
return true;
|
||||
} catch (e) {
|
||||
// IE 8 has a broken defineProperty
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
||||
// node v0.6 has a bug where array lengths can be Set but not Defined
|
||||
if (!hasPropertyDescriptors()) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
||||
} catch (e) {
|
||||
// In Firefox 4-22, defining length on an array throws an exception.
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = hasPropertyDescriptors;
|
||||
|
||||
},{"get-intrinsic":9}],11:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
||||
var hasSymbolSham = require('./shams');
|
||||
|
||||
module.exports = function hasNativeSymbols() {
|
||||
if (typeof origSymbol !== 'function') { return false; }
|
||||
if (typeof Symbol !== 'function') { return false; }
|
||||
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
||||
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
||||
|
||||
return hasSymbolSham();
|
||||
};
|
||||
|
||||
},{"./shams":12}],12:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
||||
module.exports = function hasSymbols() {
|
||||
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
||||
if (typeof Symbol.iterator === 'symbol') { return true; }
|
||||
|
||||
var obj = {};
|
||||
var sym = Symbol('test');
|
||||
var symObj = Object(sym);
|
||||
if (typeof sym === 'string') { return false; }
|
||||
|
||||
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
||||
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
||||
|
||||
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
||||
// if (sym instanceof Symbol) { return false; }
|
||||
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
||||
// if (!(symObj instanceof Symbol)) { return false; }
|
||||
|
||||
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
||||
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
||||
|
||||
var symVal = 42;
|
||||
obj[sym] = symVal;
|
||||
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
||||
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
||||
|
||||
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
||||
|
||||
var syms = Object.getOwnPropertySymbols(obj);
|
||||
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
||||
|
||||
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
||||
|
||||
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
||||
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
},{}],13:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var bind = require('function-bind');
|
||||
|
||||
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
|
||||
|
||||
},{"function-bind":8}],14:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var keysShim;
|
||||
if (!Object.keys) {
|
||||
// modified from https://github.com/es-shims/es5-shim
|
||||
var has = Object.prototype.hasOwnProperty;
|
||||
var toStr = Object.prototype.toString;
|
||||
var isArgs = require('./isArguments'); // eslint-disable-line global-require
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
|
||||
var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
|
||||
var dontEnums = [
|
||||
'toString',
|
||||
'toLocaleString',
|
||||
'valueOf',
|
||||
'hasOwnProperty',
|
||||
'isPrototypeOf',
|
||||
'propertyIsEnumerable',
|
||||
'constructor'
|
||||
];
|
||||
var equalsConstructorPrototype = function (o) {
|
||||
var ctor = o.constructor;
|
||||
return ctor && ctor.prototype === o;
|
||||
};
|
||||
var excludedKeys = {
|
||||
$applicationCache: true,
|
||||
$console: true,
|
||||
$external: true,
|
||||
$frame: true,
|
||||
$frameElement: true,
|
||||
$frames: true,
|
||||
$innerHeight: true,
|
||||
$innerWidth: true,
|
||||
$onmozfullscreenchange: true,
|
||||
$onmozfullscreenerror: true,
|
||||
$outerHeight: true,
|
||||
$outerWidth: true,
|
||||
$pageXOffset: true,
|
||||
$pageYOffset: true,
|
||||
$parent: true,
|
||||
$scrollLeft: true,
|
||||
$scrollTop: true,
|
||||
$scrollX: true,
|
||||
$scrollY: true,
|
||||
$self: true,
|
||||
$webkitIndexedDB: true,
|
||||
$webkitStorageInfo: true,
|
||||
$window: true
|
||||
};
|
||||
var hasAutomationEqualityBug = (function () {
|
||||
/* global window */
|
||||
if (typeof window === 'undefined') { return false; }
|
||||
for (var k in window) {
|
||||
try {
|
||||
if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
|
||||
try {
|
||||
equalsConstructorPrototype(window[k]);
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}());
|
||||
var equalsConstructorPrototypeIfNotBuggy = function (o) {
|
||||
/* global window */
|
||||
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
|
||||
return equalsConstructorPrototype(o);
|
||||
}
|
||||
try {
|
||||
return equalsConstructorPrototype(o);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
keysShim = function keys(object) {
|
||||
var isObject = object !== null && typeof object === 'object';
|
||||
var isFunction = toStr.call(object) === '[object Function]';
|
||||
var isArguments = isArgs(object);
|
||||
var isString = isObject && toStr.call(object) === '[object String]';
|
||||
var theKeys = [];
|
||||
|
||||
if (!isObject && !isFunction && !isArguments) {
|
||||
throw new TypeError('Object.keys called on a non-object');
|
||||
}
|
||||
|
||||
var skipProto = hasProtoEnumBug && isFunction;
|
||||
if (isString && object.length > 0 && !has.call(object, 0)) {
|
||||
for (var i = 0; i < object.length; ++i) {
|
||||
theKeys.push(String(i));
|
||||
}
|
||||
}
|
||||
|
||||
if (isArguments && object.length > 0) {
|
||||
for (var j = 0; j < object.length; ++j) {
|
||||
theKeys.push(String(j));
|
||||
}
|
||||
} else {
|
||||
for (var name in object) {
|
||||
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
|
||||
theKeys.push(String(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hasDontEnumBug) {
|
||||
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
|
||||
|
||||
for (var k = 0; k < dontEnums.length; ++k) {
|
||||
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
|
||||
theKeys.push(dontEnums[k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return theKeys;
|
||||
};
|
||||
}
|
||||
module.exports = keysShim;
|
||||
|
||||
},{"./isArguments":16}],15:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var slice = Array.prototype.slice;
|
||||
var isArgs = require('./isArguments');
|
||||
|
||||
var origKeys = Object.keys;
|
||||
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');
|
||||
|
||||
var originalKeys = Object.keys;
|
||||
|
||||
keysShim.shim = function shimObjectKeys() {
|
||||
if (Object.keys) {
|
||||
var keysWorksWithArguments = (function () {
|
||||
// Safari 5.0 bug
|
||||
var args = Object.keys(arguments);
|
||||
return args && args.length === arguments.length;
|
||||
}(1, 2));
|
||||
if (!keysWorksWithArguments) {
|
||||
Object.keys = function keys(object) { // eslint-disable-line func-name-matching
|
||||
if (isArgs(object)) {
|
||||
return originalKeys(slice.call(object));
|
||||
}
|
||||
return originalKeys(object);
|
||||
};
|
||||
}
|
||||
} else {
|
||||
Object.keys = keysShim;
|
||||
}
|
||||
return Object.keys || keysShim;
|
||||
};
|
||||
|
||||
module.exports = keysShim;
|
||||
|
||||
},{"./implementation":14,"./isArguments":16}],16:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var toStr = Object.prototype.toString;
|
||||
|
||||
module.exports = function isArguments(value) {
|
||||
var str = toStr.call(value);
|
||||
var isArgs = str === '[object Arguments]';
|
||||
if (!isArgs) {
|
||||
isArgs = str !== '[object Array]' &&
|
||||
value !== null &&
|
||||
typeof value === 'object' &&
|
||||
typeof value.length === 'number' &&
|
||||
value.length >= 0 &&
|
||||
toStr.call(value.callee) === '[object Function]';
|
||||
}
|
||||
return isArgs;
|
||||
};
|
||||
|
||||
},{}],17:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var implementation = require('./implementation');
|
||||
|
||||
var lacksProperEnumerationOrder = function () {
|
||||
if (!Object.assign) {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* v8, specifically in node 4.x, has a bug with incorrect property enumeration order
|
||||
* note: this does not detect the bug unless there's 20 characters
|
||||
*/
|
||||
var str = 'abcdefghijklmnopqrst';
|
||||
var letters = str.split('');
|
||||
var map = {};
|
||||
for (var i = 0; i < letters.length; ++i) {
|
||||
map[letters[i]] = letters[i];
|
||||
}
|
||||
var obj = Object.assign({}, map);
|
||||
var actual = '';
|
||||
for (var k in obj) {
|
||||
actual += k;
|
||||
}
|
||||
return str !== actual;
|
||||
};
|
||||
|
||||
var assignHasPendingExceptions = function () {
|
||||
if (!Object.assign || !Object.preventExtensions) {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
||||
* which is 72% slower than our shim, and Firefox 40's native implementation.
|
||||
*/
|
||||
var thrower = Object.preventExtensions({ 1: 2 });
|
||||
try {
|
||||
Object.assign(thrower, 'xy');
|
||||
} catch (e) {
|
||||
return thrower[1] === 'y';
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
module.exports = function getPolyfill() {
|
||||
if (!Object.assign) {
|
||||
return implementation;
|
||||
}
|
||||
if (lacksProperEnumerationOrder()) {
|
||||
return implementation;
|
||||
}
|
||||
if (assignHasPendingExceptions()) {
|
||||
return implementation;
|
||||
}
|
||||
return Object.assign;
|
||||
};
|
||||
|
||||
},{"./implementation":2}],18:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var define = require('define-properties');
|
||||
var getPolyfill = require('./polyfill');
|
||||
|
||||
module.exports = function shimAssign() {
|
||||
var polyfill = getPolyfill();
|
||||
define(
|
||||
Object,
|
||||
{ assign: polyfill },
|
||||
{ assign: function () { return Object.assign !== polyfill; } }
|
||||
);
|
||||
return polyfill;
|
||||
};
|
||||
|
||||
},{"./polyfill":17,"define-properties":6}]},{},[1]);
|
43
node_modules/object.assign/hasSymbols.js
generated
vendored
Normal file
43
node_modules/object.assign/hasSymbols.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
|
||||
var keys = require('object-keys');
|
||||
|
||||
module.exports = function hasSymbols() {
|
||||
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
||||
if (typeof Symbol.iterator === 'symbol') { return true; }
|
||||
|
||||
var obj = {};
|
||||
var sym = Symbol('test');
|
||||
var symObj = Object(sym);
|
||||
if (typeof sym === 'string') { return false; }
|
||||
|
||||
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
||||
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
||||
|
||||
/*
|
||||
* temp disabled per https://github.com/ljharb/object.assign/issues/17
|
||||
* if (sym instanceof Symbol) { return false; }
|
||||
* temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
||||
* if (!(symObj instanceof Symbol)) { return false; }
|
||||
*/
|
||||
|
||||
var symVal = 42;
|
||||
obj[sym] = symVal;
|
||||
for (sym in obj) { return false; } // eslint-disable-line no-unreachable-loop
|
||||
if (keys(obj).length !== 0) { return false; }
|
||||
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
||||
|
||||
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
||||
|
||||
var syms = Object.getOwnPropertySymbols(obj);
|
||||
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
||||
|
||||
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
||||
|
||||
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
||||
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
46
node_modules/object.assign/implementation.js
generated
vendored
Normal file
46
node_modules/object.assign/implementation.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
'use strict';
|
||||
|
||||
// modified from https://github.com/es-shims/es6-shim
|
||||
var objectKeys = require('object-keys');
|
||||
var hasSymbols = require('has-symbols/shams')();
|
||||
var callBound = require('call-bind/callBound');
|
||||
var toObject = Object;
|
||||
var $push = callBound('Array.prototype.push');
|
||||
var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
|
||||
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
module.exports = function assign(target, source1) {
|
||||
if (target == null) { throw new TypeError('target must be an object'); }
|
||||
var to = toObject(target); // step 1
|
||||
if (arguments.length === 1) {
|
||||
return to; // step 2
|
||||
}
|
||||
for (var s = 1; s < arguments.length; ++s) {
|
||||
var from = toObject(arguments[s]); // step 3.a.i
|
||||
|
||||
// step 3.a.ii:
|
||||
var keys = objectKeys(from);
|
||||
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
|
||||
if (getSymbols) {
|
||||
var syms = getSymbols(from);
|
||||
for (var j = 0; j < syms.length; ++j) {
|
||||
var key = syms[j];
|
||||
if ($propIsEnumerable(from, key)) {
|
||||
$push(keys, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// step 3.a.iii:
|
||||
for (var i = 0; i < keys.length; ++i) {
|
||||
var nextKey = keys[i];
|
||||
if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2
|
||||
var propValue = from[nextKey]; // step 3.a.iii.2.a
|
||||
to[nextKey] = propValue; // step 3.a.iii.2.b
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return to; // step 4
|
||||
};
|
22
node_modules/object.assign/index.js
generated
vendored
Normal file
22
node_modules/object.assign/index.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
var defineProperties = require('define-properties');
|
||||
var callBind = require('call-bind');
|
||||
|
||||
var implementation = require('./implementation');
|
||||
var getPolyfill = require('./polyfill');
|
||||
var shim = require('./shim');
|
||||
|
||||
var polyfill = callBind.apply(getPolyfill());
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var bound = function assign(target, source1) {
|
||||
return polyfill(Object, arguments);
|
||||
};
|
||||
|
||||
defineProperties(bound, {
|
||||
getPolyfill: getPolyfill,
|
||||
implementation: implementation,
|
||||
shim: shim
|
||||
});
|
||||
|
||||
module.exports = bound;
|
127
node_modules/object.assign/package.json
generated
vendored
Normal file
127
node_modules/object.assign/package.json
generated
vendored
Normal file
@ -0,0 +1,127 @@
|
||||
{
|
||||
"_from": "object.assign@^4.1.0",
|
||||
"_id": "object.assign@4.1.4",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==",
|
||||
"_location": "/object.assign",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "object.assign@^4.1.0",
|
||||
"name": "object.assign",
|
||||
"escapedName": "object.assign",
|
||||
"rawSpec": "^4.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-plugin-dynamic-import-node"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz",
|
||||
"_shasum": "9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f",
|
||||
"_spec": "object.assign@^4.1.0",
|
||||
"_where": "C:\\Users\\zhouxueli\\Desktop\\scheduling-app\\node_modules\\babel-plugin-dynamic-import-node",
|
||||
"author": {
|
||||
"name": "Jordan Harband"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/object.assign/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.1.4",
|
||||
"has-symbols": "^1.0.3",
|
||||
"object-keys": "^1.1.1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim",
|
||||
"devDependencies": {
|
||||
"@es-shims/api": "^2.2.3",
|
||||
"@ljharb/eslint-config": "^21.0.0",
|
||||
"aud": "^2.0.0",
|
||||
"browserify": "^16.5.2",
|
||||
"eslint": "=8.8.0",
|
||||
"for-each": "^0.3.3",
|
||||
"functions-have-names": "^1.2.3",
|
||||
"has": "^1.0.3",
|
||||
"has-strict-mode": "^1.0.1",
|
||||
"is": "^3.3.0",
|
||||
"mock-property": "^1.0.0",
|
||||
"npmignore": "^0.3.0",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"ses": "^0.11.1",
|
||||
"tape": "^5.5.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/object.assign#readme",
|
||||
"keywords": [
|
||||
"Object.assign",
|
||||
"assign",
|
||||
"ES6",
|
||||
"extend",
|
||||
"$.extend",
|
||||
"jQuery",
|
||||
"_.extend",
|
||||
"Underscore",
|
||||
"es-shim API",
|
||||
"polyfill",
|
||||
"shim"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "object.assign",
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows",
|
||||
"bower.json",
|
||||
"browserShim.js",
|
||||
"!dist/"
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/ljharb/object.assign.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "mkdir -p dist && browserify browserShim.js > dist/browser.js",
|
||||
"lint": "eslint .",
|
||||
"posttest": "aud --production",
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest && npm run build",
|
||||
"pretest": "npm run lint && es-shim-api --bound",
|
||||
"test": "npm run tests-only && npm run test:ses",
|
||||
"test:implementation": "nyc node test",
|
||||
"test:native": "nyc node test/native",
|
||||
"test:ses": "node test/ses-compat",
|
||||
"test:shim": "nyc node test/shimmed",
|
||||
"tests-only": "npm run test:implementation && npm run test:shim"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js",
|
||||
"browsers": [
|
||||
"iexplore/6.0..latest",
|
||||
"firefox/3.0..6.0",
|
||||
"firefox/15.0..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/4.0..10.0",
|
||||
"chrome/20.0..latest",
|
||||
"chrome/canary",
|
||||
"opera/10.0..latest",
|
||||
"opera/next",
|
||||
"safari/4.0..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2"
|
||||
]
|
||||
},
|
||||
"version": "4.1.4"
|
||||
}
|
55
node_modules/object.assign/polyfill.js
generated
vendored
Normal file
55
node_modules/object.assign/polyfill.js
generated
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
'use strict';
|
||||
|
||||
var implementation = require('./implementation');
|
||||
|
||||
var lacksProperEnumerationOrder = function () {
|
||||
if (!Object.assign) {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* v8, specifically in node 4.x, has a bug with incorrect property enumeration order
|
||||
* note: this does not detect the bug unless there's 20 characters
|
||||
*/
|
||||
var str = 'abcdefghijklmnopqrst';
|
||||
var letters = str.split('');
|
||||
var map = {};
|
||||
for (var i = 0; i < letters.length; ++i) {
|
||||
map[letters[i]] = letters[i];
|
||||
}
|
||||
var obj = Object.assign({}, map);
|
||||
var actual = '';
|
||||
for (var k in obj) {
|
||||
actual += k;
|
||||
}
|
||||
return str !== actual;
|
||||
};
|
||||
|
||||
var assignHasPendingExceptions = function () {
|
||||
if (!Object.assign || !Object.preventExtensions) {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
||||
* which is 72% slower than our shim, and Firefox 40's native implementation.
|
||||
*/
|
||||
var thrower = Object.preventExtensions({ 1: 2 });
|
||||
try {
|
||||
Object.assign(thrower, 'xy');
|
||||
} catch (e) {
|
||||
return thrower[1] === 'y';
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
module.exports = function getPolyfill() {
|
||||
if (!Object.assign) {
|
||||
return implementation;
|
||||
}
|
||||
if (lacksProperEnumerationOrder()) {
|
||||
return implementation;
|
||||
}
|
||||
if (assignHasPendingExceptions()) {
|
||||
return implementation;
|
||||
}
|
||||
return Object.assign;
|
||||
};
|
14
node_modules/object.assign/shim.js
generated
vendored
Normal file
14
node_modules/object.assign/shim.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
var define = require('define-properties');
|
||||
var getPolyfill = require('./polyfill');
|
||||
|
||||
module.exports = function shimAssign() {
|
||||
var polyfill = getPolyfill();
|
||||
define(
|
||||
Object,
|
||||
{ assign: polyfill },
|
||||
{ assign: function () { return Object.assign !== polyfill; } }
|
||||
);
|
||||
return polyfill;
|
||||
};
|
18458
node_modules/object.assign/test.html
generated
vendored
Normal file
18458
node_modules/object.assign/test.html
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
19
node_modules/object.assign/test/implementation.js
generated
vendored
Normal file
19
node_modules/object.assign/test/implementation.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
var implementation = require('../implementation');
|
||||
var callBind = require('call-bind');
|
||||
var test = require('tape');
|
||||
var hasStrictMode = require('has-strict-mode')();
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('as a function', function (t) {
|
||||
t.test('bad first arg/receiver', { skip: !hasStrictMode }, function (st) {
|
||||
st['throws'](function () { implementation(undefined); }, TypeError, 'undefined is not an object');
|
||||
st['throws'](function () { implementation(null); }, TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(callBind(implementation, Object), t);
|
||||
|
||||
t.end();
|
||||
});
|
17
node_modules/object.assign/test/index.js
generated
vendored
Normal file
17
node_modules/object.assign/test/index.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
var assign = require('../');
|
||||
var test = require('tape');
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('as a function', function (t) {
|
||||
t.test('bad array/this value', function (st) {
|
||||
st['throws'](function () { assign(undefined); }, TypeError, 'undefined is not an object');
|
||||
st['throws'](function () { assign(null); }, TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(assign, t);
|
||||
|
||||
t.end();
|
||||
});
|
49
node_modules/object.assign/test/native.js
generated
vendored
Normal file
49
node_modules/object.assign/test/native.js
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var defineProperties = require('define-properties');
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
var functionsHaveNames = require('functions-have-names')();
|
||||
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('native', function (t) {
|
||||
t.equal(Object.assign.length, 2, 'Object.assign has a length of 2');
|
||||
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
|
||||
st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
|
||||
et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable');
|
||||
et.end();
|
||||
});
|
||||
|
||||
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
|
||||
|
||||
t.test('bad object value', { skip: !supportsStrictMode }, function (st) {
|
||||
st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object');
|
||||
st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
// v8 in node 0.8 and 0.10 have non-enumerable string properties
|
||||
var stringCharsAreEnumerable = isEnumerable.call('xy', 0);
|
||||
t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) {
|
||||
/*
|
||||
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
||||
* which is 72% slower than our shim, and Firefox 40's native implementation.
|
||||
*/
|
||||
var thrower = Object.preventExtensions({ 1: '2' });
|
||||
var error;
|
||||
try { Object.assign(thrower, 'xy'); } catch (e) { error = e; }
|
||||
st.equal(error instanceof TypeError, true, 'error is TypeError');
|
||||
st.equal(thrower[1], '2', 'thrower[1] === "2"');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(Object.assign, t);
|
||||
|
||||
t.end();
|
||||
});
|
12
node_modules/object.assign/test/ses-compat.js
generated
vendored
Normal file
12
node_modules/object.assign/test/ses-compat.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
/* globals lockdown */
|
||||
|
||||
// requiring ses exposes "lockdown" on the global
|
||||
require('ses');
|
||||
|
||||
// lockdown freezes the primordials
|
||||
lockdown({ errorTaming: 'unsafe' });
|
||||
|
||||
// initialize the module
|
||||
require('./');
|
52
node_modules/object.assign/test/shimmed.js
generated
vendored
Normal file
52
node_modules/object.assign/test/shimmed.js
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
'use strict';
|
||||
|
||||
var assign = require('../');
|
||||
assign.shim();
|
||||
|
||||
var test = require('tape');
|
||||
var defineProperties = require('define-properties');
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
var functionsHaveNames = require('functions-have-names')();
|
||||
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('shimmed', function (t) {
|
||||
t.equal(Object.assign.length, 2, 'Object.assign has a length of 2');
|
||||
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
|
||||
st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
|
||||
et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable');
|
||||
et.end();
|
||||
});
|
||||
|
||||
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
|
||||
|
||||
t.test('bad object value', { skip: !supportsStrictMode }, function (st) {
|
||||
st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object');
|
||||
st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
// v8 in node 0.8 and 0.10 have non-enumerable string properties
|
||||
var stringCharsAreEnumerable = isEnumerable.call('xy', 0);
|
||||
t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) {
|
||||
/*
|
||||
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
||||
* which is 72% slower than our shim, and Firefox 40's native implementation.
|
||||
*/
|
||||
var thrower = Object.preventExtensions({ 1: '2' });
|
||||
var error;
|
||||
try { Object.assign(thrower, 'xy'); } catch (e) { error = e; }
|
||||
st.equal(error instanceof TypeError, true, 'error is TypeError');
|
||||
st.equal(thrower[1], '2', 'thrower[1] === "2"');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(Object.assign, t);
|
||||
|
||||
t.end();
|
||||
});
|
232
node_modules/object.assign/test/tests.js
generated
vendored
Normal file
232
node_modules/object.assign/test/tests.js
generated
vendored
Normal file
@ -0,0 +1,232 @@
|
||||
'use strict';
|
||||
|
||||
var hasSymbols = require('has-symbols/shams')();
|
||||
var forEach = require('for-each');
|
||||
var has = require('has');
|
||||
var mockProperty = require('mock-property');
|
||||
|
||||
module.exports = function (assign, t) {
|
||||
t.test('error cases', function (st) {
|
||||
st['throws'](function () { assign(null); }, TypeError, 'target must be an object');
|
||||
st['throws'](function () { assign(undefined); }, TypeError, 'target must be an object');
|
||||
st['throws'](function () { assign(null, {}); }, TypeError, 'target must be an object');
|
||||
st['throws'](function () { assign(undefined, {}); }, TypeError, 'target must be an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('non-object target, no sources', function (st) {
|
||||
var bool = assign(true);
|
||||
st.equal(typeof bool, 'object', 'bool is object');
|
||||
st.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`');
|
||||
|
||||
var number = assign(1);
|
||||
st.equal(typeof number, 'object', 'number is object');
|
||||
st.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`');
|
||||
|
||||
var string = assign('1');
|
||||
st.equal(typeof string, 'object', 'number is object');
|
||||
st.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('non-object target, with sources', function (st) {
|
||||
var signal = {};
|
||||
|
||||
st.test('boolean', function (st2) {
|
||||
var bool = assign(true, { a: signal });
|
||||
st2.equal(typeof bool, 'object', 'bool is object');
|
||||
st2.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`');
|
||||
st2.equal(bool.a, signal, 'source properties copied');
|
||||
st2.end();
|
||||
});
|
||||
|
||||
st.test('number', function (st2) {
|
||||
var number = assign(1, { a: signal });
|
||||
st2.equal(typeof number, 'object', 'number is object');
|
||||
st2.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`');
|
||||
st2.equal(number.a, signal, 'source properties copied');
|
||||
st2.end();
|
||||
});
|
||||
|
||||
st.test('string', function (st2) {
|
||||
var string = assign('1', { a: signal });
|
||||
st2.equal(typeof string, 'object', 'number is object');
|
||||
st2.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`');
|
||||
st2.equal(string.a, signal, 'source properties copied');
|
||||
st2.end();
|
||||
});
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('non-object sources', function (st) {
|
||||
st.deepEqual(assign({ a: 1 }, null, { b: 2 }), { a: 1, b: 2 }, 'ignores null source');
|
||||
st.deepEqual(assign({ a: 1 }, { b: 2 }, undefined), { a: 1, b: 2 }, 'ignores undefined source');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('returns the modified target object', function (st) {
|
||||
var target = {};
|
||||
var returned = assign(target, { a: 1 });
|
||||
st.equal(returned, target, 'returned object is the same reference as the target object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('has the right length', function (st) {
|
||||
st.equal(assign.length, 2, 'length is 2 => 2 required arguments');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('merge two objects', function (st) {
|
||||
var target = { a: 1 };
|
||||
var returned = assign(target, { b: 2 });
|
||||
st.deepEqual(returned, { a: 1, b: 2 }, 'returned object has properties from both');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('works with functions', function (st) {
|
||||
var target = function () {};
|
||||
target.a = 1;
|
||||
var returned = assign(target, { b: 2 });
|
||||
st.equal(target, returned, 'returned object is target');
|
||||
st.equal(returned.a, 1);
|
||||
st.equal(returned.b, 2);
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('works with primitives', function (st) {
|
||||
var target = 2;
|
||||
var source = { b: 42 };
|
||||
var returned = assign(target, source);
|
||||
st.equal(Object.prototype.toString.call(returned), '[object Number]', 'returned is object form of number primitive');
|
||||
st.equal(Number(returned), target, 'returned and target have same valueOf');
|
||||
st.equal(returned.b, source.b);
|
||||
st.end();
|
||||
});
|
||||
|
||||
/* globals window */
|
||||
t.test('works with window.location', { skip: typeof window === 'undefined' }, function (st) {
|
||||
var target = {};
|
||||
assign(target, window.location);
|
||||
for (var prop in window.location) {
|
||||
if (has(window.location, prop)) {
|
||||
st.deepEqual(target[prop], window.location[prop], prop + ' is copied');
|
||||
}
|
||||
}
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('merge N objects', function (st) {
|
||||
var target = { a: 1 };
|
||||
var source1 = { b: 2 };
|
||||
var source2 = { c: 3 };
|
||||
var returned = assign(target, source1, source2);
|
||||
st.deepEqual(returned, { a: 1, b: 2, c: 3 }, 'returned object has properties from all sources');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('only iterates over own keys', function (st) {
|
||||
var Foo = function () {};
|
||||
Foo.prototype.bar = true;
|
||||
var foo = new Foo();
|
||||
foo.baz = true;
|
||||
var target = { a: 1 };
|
||||
var returned = assign(target, foo);
|
||||
st.equal(returned, target, 'returned object is the same reference as the target object');
|
||||
st.deepEqual(target, { a: 1, baz: true }, 'returned object has only own properties from both');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('includes enumerable symbols, after keys', { skip: !hasSymbols }, function (st) {
|
||||
var visited = [];
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } });
|
||||
var symbol = Symbol('enumerable');
|
||||
Object.defineProperty(obj, symbol, {
|
||||
enumerable: true,
|
||||
get: function () { visited.push(symbol); return Infinity; }
|
||||
});
|
||||
var nonEnumSymbol = Symbol('non-enumerable');
|
||||
Object.defineProperty(obj, nonEnumSymbol, {
|
||||
enumerable: false,
|
||||
get: function () { visited.push(nonEnumSymbol); return -Infinity; }
|
||||
});
|
||||
var target = assign({}, obj);
|
||||
st.deepEqual(visited, ['a', symbol], 'key is visited first, then symbol');
|
||||
st.equal(target.a, 42, 'target.a is 42');
|
||||
st.equal(target[symbol], Infinity, 'target[symbol] is Infinity');
|
||||
st.notEqual(target[nonEnumSymbol], -Infinity, 'target[nonEnumSymbol] is not -Infinity');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('does not fail when symbols are not present', { skip: !Object.isFrozen || Object.isFrozen(Object) }, function (st) {
|
||||
st.teardown(mockProperty(Object, 'getOwnPropertySymbols', { 'delete': true }));
|
||||
|
||||
var visited = [];
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } });
|
||||
var keys = ['a'];
|
||||
if (hasSymbols) {
|
||||
var symbol = Symbol('sym');
|
||||
Object.defineProperty(obj, symbol, {
|
||||
enumerable: true,
|
||||
get: function () { visited.push(symbol); return Infinity; }
|
||||
});
|
||||
keys.push(symbol);
|
||||
}
|
||||
var target = assign({}, obj);
|
||||
st.deepEqual(visited, keys, 'assign visits expected keys');
|
||||
st.equal(target.a, 42, 'target.a is 42');
|
||||
|
||||
if (hasSymbols) {
|
||||
st.equal(target[symbol], Infinity);
|
||||
}
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('preserves correct property enumeration order', function (st) {
|
||||
var str = 'abcdefghijklmnopqrst';
|
||||
var letters = {};
|
||||
forEach(str.split(''), function (letter) {
|
||||
letters[letter] = letter;
|
||||
});
|
||||
|
||||
var n = 5;
|
||||
st.comment('run the next test ' + n + ' times');
|
||||
var object = assign({}, letters);
|
||||
var actual = '';
|
||||
for (var k in object) {
|
||||
actual += k;
|
||||
}
|
||||
for (var i = 0; i < n; ++i) {
|
||||
st.equal(actual, str, 'property enumeration order should be followed');
|
||||
}
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('checks enumerability and existence, in case of modification during [[Get]]', { skip: !Object.defineProperty }, function (st) {
|
||||
var targetBvalue = {};
|
||||
var targetCvalue = {};
|
||||
var target = { b: targetBvalue, c: targetCvalue };
|
||||
var source = {};
|
||||
Object.defineProperty(source, 'a', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
delete this.b;
|
||||
Object.defineProperty(this, 'c', { enumerable: false });
|
||||
return 'a';
|
||||
}
|
||||
});
|
||||
var sourceBvalue = {};
|
||||
var sourceCvalue = {};
|
||||
source.b = sourceBvalue;
|
||||
source.c = sourceCvalue;
|
||||
var result = assign(target, source);
|
||||
st.equal(result, target, 'sanity check: result is === target');
|
||||
st.equal(result.b, targetBvalue, 'target key not overwritten by deleted source key');
|
||||
st.equal(result.c, targetCvalue, 'target key not overwritten by non-enumerable source key');
|
||||
|
||||
st.end();
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user