mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 05:32:18 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
16
web/node_modules/es5-ext/.editorconfig
generated
vendored
Normal file
16
web/node_modules/es5-ext/.editorconfig
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = tab
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = false
|
1
web/node_modules/es5-ext/.github/FUNDING.yml
generated
vendored
Normal file
1
web/node_modules/es5-ext/.github/FUNDING.yml
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
tidelift: "npm/es5-ext"
|
325
web/node_modules/es5-ext/CHANGELOG.md
generated
vendored
Normal file
325
web/node_modules/es5-ext/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,325 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
### [0.10.53](https://github.com/medikoo/es5-ext/compare/v0.10.52...v0.10.53) (2019-11-21)
|
||||
|
||||
### [0.10.52](https://github.com/medikoo/es5-ext/compare/v0.10.51...v0.10.52) (2019-10-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Fix global resolution for Safari ([00731d2](https://github.com/medikoo/es5-ext/commit/00731d2))
|
||||
- Keep support for old Node.js versions ([2fa2a11](https://github.com/medikoo/es5-ext/commit/2fa2a11))
|
||||
|
||||
### [0.10.51](https://github.com/medikoo/es5-ext/compare/v0.10.50...v0.10.51) (2019-08-30)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Ensure Function.isFunction recognizes async functions ([6f06e66](https://github.com/medikoo/es5-ext/commit/6f06e66))
|
||||
|
||||
### Tests
|
||||
|
||||
- Fix after prettification changes ([dd6fc3f](https://github.com/medikoo/es5-ext/commit/dd6fc3f))
|
||||
|
||||
## [0.10.50](https://github.com/medikoo/es5-ext/compare/v0.10.49...v0.10.50) (2019-04-30)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- maximum time value reference ([708202d](https://github.com/medikoo/es5-ext/commit/708202d))
|
||||
|
||||
### Features
|
||||
|
||||
- ensure global resolves in strict mode ([c6a19d7](https://github.com/medikoo/es5-ext/commit/c6a19d7)), closes [#86](https://github.com/medikoo/es5-ext/issues/86)
|
||||
|
||||
## [0.10.49](https://github.com/medikoo/es5-ext/compare/v0.10.48...v0.10.49) (2019-03-11)
|
||||
|
||||
### Features
|
||||
|
||||
- allow plain function usage of fn.compose ([2bafef7](https://github.com/medikoo/es5-ext/commit/2bafef7))
|
||||
|
||||
## [0.10.48](https://github.com/medikoo/es5-ext/compare/v0.10.47...v0.10.48) (2019-02-22)
|
||||
|
||||
### Features
|
||||
|
||||
- Object.ensurePlainObject util ([f48fbcf](https://github.com/medikoo/es5-ext/commit/f48fbcf))
|
||||
|
||||
<a name="0.10.47"></a>
|
||||
|
||||
## [0.10.47](https://github.com/medikoo/es5-ext/compare/v0.10.46...v0.10.47) (2019-01-16)
|
||||
|
||||
### Features
|
||||
|
||||
- Promise.prototype.finally shim ([4dadbc7](https://github.com/medikoo/es5-ext/commit/4dadbc7))
|
||||
|
||||
<a name="0.10.46"></a>
|
||||
|
||||
## [0.10.46](https://github.com/medikoo/es5-ext/compare/v0.10.45...v0.10.46) (2018-08-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- assign-deep to not modify following arguments ([bf43d57](https://github.com/medikoo/es5-ext/commit/bf43d57))
|
||||
|
||||
<a name="0.10.45"></a>
|
||||
|
||||
## [0.10.45](https://github.com/medikoo/es5-ext/compare/v0.10.44...v0.10.45) (2018-06-01)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- improve error message readbility ([adc91b9](https://github.com/medikoo/es5-ext/commit/adc91b9))
|
||||
|
||||
<a name="0.10.44"></a>
|
||||
|
||||
## [0.10.44](https://github.com/medikoo/es5-ext/compare/v0.10.43...v0.10.44) (2018-05-30)
|
||||
|
||||
### Features
|
||||
|
||||
- add Object.entries ([51d2f43](https://github.com/medikoo/es5-ext/commit/51d2f43))
|
||||
|
||||
<a name="0.10.43"></a>
|
||||
|
||||
## [0.10.43](https://github.com/medikoo/es5-ext/compare/v0.10.42...v0.10.43) (2018-05-28)
|
||||
|
||||
### Features
|
||||
|
||||
- improve patch string ([6a25b10](https://github.com/medikoo/es5-ext/commit/6a25b10))
|
||||
|
||||
<a name="0.10.42"></a>
|
||||
|
||||
## [0.10.42](https://github.com/medikoo/es5-ext/compare/v0.10.41...v0.10.42) (2018-03-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Date.isDate to exclude NaN dates ([3b61bc6](https://github.com/medikoo/es5-ext/commit/3b61bc6))
|
||||
|
||||
### Features
|
||||
|
||||
- improve non-coercible string representation ([20bfb78](https://github.com/medikoo/es5-ext/commit/20bfb78))
|
||||
- improve non-stringifiable string representation ([2e4512d](https://github.com/medikoo/es5-ext/commit/2e4512d))
|
||||
|
||||
<a name="0.10.41"></a>
|
||||
|
||||
## [0.10.41](https://github.com/medikoo/es5-ext/compare/v0.10.40...v0.10.41) (2018-03-16)
|
||||
|
||||
### Features
|
||||
|
||||
- Add function.microtaskDelay method ([66481c0](https://github.com/medikoo/es5-ext/commit/66481c0))
|
||||
- Add Object.isThenable ([8d5a45c](https://github.com/medikoo/es5-ext/commit/8d5a45c))
|
||||
- Add promise.asCallback method ([dcc1451](https://github.com/medikoo/es5-ext/commit/dcc1451))
|
||||
- Object.ensurePlainFunction ([2682be6](https://github.com/medikoo/es5-ext/commit/2682be6))
|
||||
|
||||
<a name="0.10.40"></a>
|
||||
|
||||
## [0.10.40](https://github.com/medikoo/es5-ext/compare/v0.10.39...v0.10.40) (2018-03-09)
|
||||
|
||||
### Features
|
||||
|
||||
- **math:** decimal round, floor and ceil ([39290c6](https://github.com/medikoo/es5-ext/commit/39290c6))
|
||||
- **object:** isInteger and ensureInteger ([a5f7d04](https://github.com/medikoo/es5-ext/commit/a5f7d04))
|
||||
|
||||
<a name="0.10.39"></a>
|
||||
|
||||
## [0.10.39](https://github.com/medikoo/es5-ext/compare/v0.10.38...v0.10.39) (2018-02-16)
|
||||
|
||||
### Features
|
||||
|
||||
- Promise.lazy ([7a30a78](https://github.com/medikoo/es5-ext/commit/7a30a78))
|
||||
|
||||
<a name="0.10.38"></a>
|
||||
|
||||
## [0.10.38](https://github.com/medikoo/es5-ext/compare/v0.10.37...v0.10.38) (2018-01-16)
|
||||
|
||||
### Features
|
||||
|
||||
- Object.isNaturalNumber an Object.isNaturalNumberValue ([66a40af](https://github.com/medikoo/es5-ext/commit/66a40af))
|
||||
|
||||
<a name="0.10.37"></a>
|
||||
|
||||
## [0.10.37](https://github.com/medikoo/es5-ext/compare/v0.10.36...v0.10.37) (2017-11-23)
|
||||
|
||||
### Features
|
||||
|
||||
- String.random util ([7c28739](https://github.com/medikoo/es5-ext/commit/7c28739))
|
||||
|
||||
<a name="0.10.36"></a>
|
||||
|
||||
## [0.10.36](https://github.com/medikoo/es5-ext/compare/v0.10.35...v0.10.36) (2017-11-23)
|
||||
|
||||
### Features
|
||||
|
||||
- **date:** isTimeValue and ensureTimeValue utils ([7659dc5](https://github.com/medikoo/es5-ext/commit/7659dc5))
|
||||
|
||||
<a name="0.10.35"></a>
|
||||
|
||||
## [0.10.35](https://github.com/medikoo/es5-ext/compare/v0.10.34...v0.10.35) (2017-10-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Object.copy:** do not upgrade primitives to objects ([dd4d88f](https://github.com/medikoo/es5-ext/commit/dd4d88f))
|
||||
|
||||
<a name="0.10.34"></a>
|
||||
|
||||
## [0.10.34](https://github.com/medikoo/es5-ext/compare/v0.10.33...v0.10.34) (2017-10-13)
|
||||
|
||||
### Features
|
||||
|
||||
- **copyDeep:** duplicate only recursive instances ([bba529a](https://github.com/medikoo/es5-ext/commit/bba529a))
|
||||
|
||||
<a name="0.10.33"></a>
|
||||
|
||||
## [0.10.33](https://github.com/medikoo/es5-ext/compare/v0.10.32...v0.10.33) (2017-10-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Object.assignDeep:** relax input validation ([1baf57d](https://github.com/medikoo/es5-ext/commit/1baf57d))
|
||||
|
||||
<a name="0.10.32"></a>
|
||||
|
||||
## [0.10.32](https://github.com/medikoo/es5-ext/compare/v0.10.31...v0.10.32) (2017-10-13)
|
||||
|
||||
### Features
|
||||
|
||||
- Object.assignDeep ([2345e0b](https://github.com/medikoo/es5-ext/commit/2345e0b))
|
||||
|
||||
<a name="0.10.31"></a>
|
||||
|
||||
## [0.10.31](https://github.com/medikoo/es5-ext/compare/v0.10.30...v0.10.31) (2017-10-09)
|
||||
|
||||
### Features
|
||||
|
||||
- Object.isPlainFunction utility ([031be0a](https://github.com/medikoo/es5-ext/commit/031be0a))
|
||||
|
||||
<a name="0.10.30"></a>
|
||||
|
||||
## [0.10.30](https://github.com/medikoo/es5-ext/compare/v0.10.29...v0.10.30) (2017-08-25)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- value stringification for error message ([37bb96b](https://github.com/medikoo/es5-ext/commit/37bb96b))
|
||||
|
||||
<a name="0.10.29"></a>
|
||||
|
||||
## [0.10.29](https://github.com/medikoo/es5-ext/compare/v0.10.28...v0.10.29) (2017-08-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- string.repeat after recent regression ([b02fab4](https://github.com/medikoo/es5-ext/commit/b02fab4))
|
||||
|
||||
<a name="0.10.28"></a>
|
||||
|
||||
## [0.10.28](https://github.com/medikoo/es5-ext/compare/v0.10.27...v0.10.28) (2017-08-18)
|
||||
|
||||
### Features
|
||||
|
||||
- array.isEmpty method ([b0cfbdd](https://github.com/medikoo/es5-ext/commit/b0cfbdd))
|
||||
- improve new lines representation ([860fe8b](https://github.com/medikoo/es5-ext/commit/860fe8b))
|
||||
- Object.ensureArray util ([595c341](https://github.com/medikoo/es5-ext/commit/595c341))
|
||||
- toShortStringRepresentation util ([6842d06](https://github.com/medikoo/es5-ext/commit/6842d06))
|
||||
|
||||
<a name="0.10.27"></a>
|
||||
|
||||
## [0.10.27](https://github.com/medikoo/es5-ext/compare/v0.10.26...v0.10.27) (2017-08-11)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- isNumberValue should not crash on non-coercible values ([0db765e](https://github.com/medikoo/es5-ext/commit/0db765e))
|
||||
|
||||
### Features
|
||||
|
||||
- add Object.ensureFiniteNumber util ([11c67f5](https://github.com/medikoo/es5-ext/commit/11c67f5))
|
||||
- add Object.isFiniteNumber util ([fe5b55a](https://github.com/medikoo/es5-ext/commit/fe5b55a))
|
||||
|
||||
<a name="0.10.26"></a>
|
||||
|
||||
## [0.10.26](https://github.com/medikoo/es5-ext/compare/v0.10.25...v0.10.26) (2017-08-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **general:** ensure optionalChaining in index ([3df879a](https://github.com/medikoo/es5-ext/commit/3df879a))
|
||||
|
||||
<a name="0.10.25"></a>
|
||||
|
||||
## [0.10.25](https://github.com/medikoo/es5-ext/compare/v0.10.24...v0.10.25) (2017-08-02)
|
||||
|
||||
### Features
|
||||
|
||||
- **general:** optionalChaining utility ([26332b5](https://github.com/medikoo/es5-ext/commit/26332b5))
|
||||
|
||||
<a name="0.10.24"></a>
|
||||
|
||||
## [0.10.24](https://github.com/medikoo/es5-ext/compare/v0.10.23...v0.10.24) (2017-07-10)
|
||||
|
||||
### Features
|
||||
|
||||
- resolve global with CSP safe method ([d386449](https://github.com/medikoo/es5-ext/commit/d386449))
|
||||
|
||||
<a name="0.10.23"></a>
|
||||
|
||||
## [0.10.23](https://github.com/medikoo/es5-ext/compare/v0.10.22...v0.10.23) (2017-06-05)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Error.custom:** allow non-string code ([e8db3a0](https://github.com/medikoo/es5-ext/commit/e8db3a0))
|
||||
- **Error.custom:** improve `ext` argument detection ([0edbfbc](https://github.com/medikoo/es5-ext/commit/0edbfbc))
|
||||
|
||||
<a name="0.10.22"></a>
|
||||
|
||||
## [0.10.22](https://github.com/medikoo/es5-ext/compare/v0.10.21...v0.10.22) (2017-05-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- ensure proper symbols stringification in early implementations ([ce51900](https://github.com/medikoo/es5-ext/commit/ce51900))
|
||||
|
||||
<a name="0.10.21"></a>
|
||||
|
||||
## [0.10.21](https://github.com/medikoo/es5-ext/compare/v0.10.20...v0.10.21) (2017-05-22)
|
||||
|
||||
### Features
|
||||
|
||||
- support arrow functions in Function/#/to-tring-tokens.js ([ad3de1e](https://github.com/medikoo/es5-ext/commit/ad3de1e))
|
||||
|
||||
<a name="0.10.20"></a>
|
||||
|
||||
## [0.10.20](https://github.com/medikoo/es5-ext/compare/v0.10.19...v0.10.20) (2017-05-17)
|
||||
|
||||
### Features
|
||||
|
||||
- if listed copy not only if own property ([d7e7cef](https://github.com/medikoo/es5-ext/commit/d7e7cef))
|
||||
- support `ensure` option in Object.copy ([295326f](https://github.com/medikoo/es5-ext/commit/295326f))
|
||||
|
||||
<a name="0.10.19"></a>
|
||||
|
||||
## [0.10.19](https://github.com/medikoo/es5-ext/compare/v0.10.18...v0.10.19) (2017-05-17)
|
||||
|
||||
### Features
|
||||
|
||||
- support propertyNames option in Object.copy ([5442279](https://github.com/medikoo/es5-ext/commit/5442279))
|
||||
|
||||
<a name="0.10.18"></a>
|
||||
|
||||
## [0.10.18](https://github.com/medikoo/es5-ext/compare/v0.10.17...v0.10.18) (2017-05-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- take all changes in safeToString ([3c5cd12](https://github.com/medikoo/es5-ext/commit/3c5cd12))
|
||||
|
||||
<a name="0.10.17"></a>
|
||||
|
||||
## [0.10.17](https://github.com/medikoo/es5-ext/compare/v0.10.16...v0.10.17) (2017-05-15)
|
||||
|
||||
### Features
|
||||
|
||||
- introduce Object.ensurePromise ([46a2f45](https://github.com/medikoo/es5-ext/commit/46a2f45))
|
||||
- introduce Object.isPromise ([27aecc8](https://github.com/medikoo/es5-ext/commit/27aecc8))
|
||||
- introduce safeToString ([0cc6a7b](https://github.com/medikoo/es5-ext/commit/0cc6a7b))
|
||||
|
||||
<a name="0.10.16"></a>
|
||||
|
||||
## [0.10.16](https://github.com/medikoo/es5-ext/compare/v0.10.15...v0.10.16) (2017-05-09)
|
||||
|
||||
### Features
|
||||
|
||||
- add String.prototype.count ([2e53241](https://github.com/medikoo/es5-ext/commit/2e53241))
|
||||
|
||||
## Changelog for previous versions
|
||||
|
||||
See `CHANGES` file
|
650
web/node_modules/es5-ext/CHANGES
generated
vendored
Normal file
650
web/node_modules/es5-ext/CHANGES
generated
vendored
Normal file
|
@ -0,0 +1,650 @@
|
|||
For recent changelog see CHANGELOG.md
|
||||
|
||||
-----
|
||||
|
||||
v0.10.15 -- 2017.03.20
|
||||
* Fix Object.isValue (it was actually isNotValue)
|
||||
|
||||
v0.10.14 -- 2017.03.15
|
||||
* Object.isValue util
|
||||
|
||||
v0.10.13 -- 2017.03.13
|
||||
* Introduce JSON.safeStringify
|
||||
* Improve message handling in error/custom
|
||||
* Fix Array#concat shim
|
||||
* Improve Array#flatten algorithm so it's stack trace friendly
|
||||
* Make Object.isObject ES3 compatible
|
||||
|
||||
v0.10.12 -- 2016.07.01
|
||||
* Ensure symbols are copied in Object.mixin
|
||||
* Prevent RangeError errors in array#flatten
|
||||
* Do not validate invalidate dates in validDate
|
||||
|
||||
v0.10.11 -- 2015.12.18
|
||||
* Ensure that check for implementation of RegExp flags doesn't crash in V8 (thanks @mathiasbynens)
|
||||
|
||||
v0.10.10 -- 2015.12.11
|
||||
* Add Object.isNumberValue util
|
||||
|
||||
v0.10.9 -- 2015.12.01
|
||||
* Add Object.ensureNaturalNumber and Object.ensureNaturalNumberValue
|
||||
|
||||
v0.10.8 -- 2015.10.02
|
||||
* Add Number.isNatural
|
||||
* Add Object.find and Object.findKey
|
||||
* Support arrays in Object.copyDeep
|
||||
* Fix iteration issue in forEachRight and someRight
|
||||
* Fix detection of native sinh
|
||||
* Depend on es6-symbol v3
|
||||
|
||||
v0.10.7 -- 2015.04.22
|
||||
* New utlitities. They're convention differs from v0.10, as they were supposed to land in v1.
|
||||
Still they're non breaking and start the conventions to be used in v1
|
||||
* Object.validateArrayLike
|
||||
* Object.validateArrayLikeObject
|
||||
* Object.validateStringifiable
|
||||
* Object.validateStringifiableValue
|
||||
* Universal utilities for array-like/iterable objects
|
||||
* Iterable.is
|
||||
* Iterable.validate
|
||||
* Iterable.validateObject
|
||||
* Iterable.forEach
|
||||
* Fix camelToHyphen resolution, it must be absolutely reversable by hyphenToCamel
|
||||
* Fix calculations of large numbers in Math.tanh
|
||||
* Fix algorithm of Math.sinh
|
||||
* Fix indexes to not use real symbols
|
||||
* Fix length of String.fromCodePoint
|
||||
* Fix tests of Array#copyWithin
|
||||
* Update Travis CI configuration
|
||||
|
||||
v0.10.6 -- 2015.02.02
|
||||
* Fix handling of infinite values in Math.trunc
|
||||
* Fix handling of getters in Object.normalizeOptions
|
||||
|
||||
v0.10.5 -- 2015.01.20
|
||||
* Add Function#toStringTokens
|
||||
* Add Object.serialize and Object.unserialize
|
||||
* Add String.randomUniq
|
||||
* Fix Strin#camelToHyphen issue with tokens that end with digit
|
||||
* Optimise Number.isInteger logic
|
||||
* Improve documentation
|
||||
* Configure lint scripts
|
||||
* Fix spelling of LICENSE
|
||||
|
||||
v0.10.4 -- 2014.04.30
|
||||
* Assure maximum spec compliance of Array.of and Array.from (thanks @mathiasbynens)
|
||||
* Improve documentations
|
||||
|
||||
v0.10.3 -- 2014.04.29
|
||||
Provide accurate iterators handling:
|
||||
* Array.from improvements:
|
||||
* Assure right unicode symbols resolution when processing strings in Array.from
|
||||
* Rely on ES6 symbol shim and use native @@iterator Symbol if provided by environment
|
||||
* Add methods:
|
||||
* Array.prototype.entries
|
||||
* Array.prototype.keys
|
||||
* Array.prototype.values
|
||||
* Array.prototype[@@iterator]
|
||||
* String.prototype[@@iterator]
|
||||
|
||||
Improve documentation
|
||||
|
||||
v0.10.2 -- 2014.04.24
|
||||
- Simplify and deprecate `isCallable`. It seems in ES5 based engines there are
|
||||
no callable objects which are `typeof obj !== 'function'`
|
||||
- Update Array.from map callback signature (up to latest resolution of TC39)
|
||||
- Improve documentation
|
||||
|
||||
v0.10.1 -- 2014.04.14
|
||||
Bump version for npm
|
||||
(Workaround for accidental premature publish & unpublish of v0.10.0 a while ago)
|
||||
|
||||
v0.10.0 -- 2014.04.13
|
||||
Major update:
|
||||
- All methods and function specified for ECMAScript 6 are now introduced as
|
||||
shims accompanied with functions through which (optionally) they can be
|
||||
implementend on native objects
|
||||
- Filename convention was changed to shorter and strictly lower case names. e.g.
|
||||
`lib/String/prototype/starts-with` became `string/#/starts-with`
|
||||
- Generated functions are guaranteed to have expected length
|
||||
- Objects with null prototype (created via `Object.create(null)`) are widely
|
||||
supported (older version have crashed due to implied `obj.hasOwnProperty` and
|
||||
related invocations)
|
||||
- Support array subclasses
|
||||
- When handling lists do not limit its length to Uint32 range
|
||||
- Use newly introduced `Object.eq` for strict equality in place of `Object.is`
|
||||
- Iteration of Object have been improved so properties that were hidden or
|
||||
removed after iteration started are not iterated.
|
||||
|
||||
Additions:
|
||||
- `Array.isPlainArray`
|
||||
- `Array.validArray`
|
||||
- `Array.prototype.concat` (as updated with ES6)
|
||||
- `Array.prototype.copyWithin` (as introduced with ES6)
|
||||
- `Array.prototype.fill` (as introduced with ES6)
|
||||
- `Array.prototype.filter` (as updated with ES6)
|
||||
- `Array.prototype.findIndex` (as introduced with ES6)
|
||||
- `Array.prototype.map` (as updated with ES6)
|
||||
- `Array.prototype.separate`
|
||||
- `Array.prototype.slice` (as updated with ES6)
|
||||
- `Array.prototype.splice` (as updated with ES6)
|
||||
- `Function.prototype.copy`
|
||||
- `Math.acosh` (as introduced with ES6)
|
||||
- `Math.atanh` (as introduced with ES6)
|
||||
- `Math.cbrt` (as introduced with ES6)
|
||||
- `Math.clz32` (as introduced with ES6)
|
||||
- `Math.cosh` (as introduced with ES6)
|
||||
- `Math.expm1` (as introduced with ES6)
|
||||
- `Math.fround` (as introduced with ES6)
|
||||
- `Math.hypot` (as introduced with ES6)
|
||||
- `Math.imul` (as introduced with ES6)
|
||||
- `Math.log2` (as introduced with ES6)
|
||||
- `Math.log10` (as introduced with ES6)
|
||||
- `Math.log1p` (as introduced with ES6)
|
||||
- `Math.sinh` (as introduced with ES6)
|
||||
- `Math.tanh` (as introduced with ES6)
|
||||
- `Math.trunc` (as introduced with ES6)
|
||||
- `Number.EPSILON` (as introduced with ES6)
|
||||
- `Number.MIN_SAFE_INTEGER` (as introduced with ES6)
|
||||
- `Number.MAX_SAFE_INTEGER` (as introduced with ES6)
|
||||
- `Number.isFinite` (as introduced with ES6)
|
||||
- `Number.isInteger` (as introduced with ES6)
|
||||
- `Number.isSafeInteger` (as introduced with ES6)
|
||||
- `Object.create` (with fix for V8 issue which disallows prototype turn of
|
||||
objects derived from null
|
||||
- `Object.eq` - Less restrictive version of `Object.is` based on SameValueZero
|
||||
algorithm
|
||||
- `Object.firstKey`
|
||||
- `Object.keys` (as updated with ES6)
|
||||
- `Object.mixinPrototypes`
|
||||
- `Object.primitiveSet`
|
||||
- `Object.setPrototypeOf` (as introduced with ES6)
|
||||
- `Object.validObject`
|
||||
- `RegExp.escape`
|
||||
- `RegExp.prototype.match` (as introduced with ES6)
|
||||
- `RegExp.prototype.replace` (as introduced with ES6)
|
||||
- `RegExp.prototype.search` (as introduced with ES6)
|
||||
- `RegExp.prototype.split` (as introduced with ES6)
|
||||
- `RegExp.prototype.sticky` (as introduced with ES6)
|
||||
- `RegExp.prototype.unicode` (as introduced with ES6)
|
||||
- `String.fromCodePoint` (as introduced with ES6)
|
||||
- `String.raw` (as introduced with ES6)
|
||||
- `String.prototype.at`
|
||||
- `String.prototype.codePointAt` (as introduced with ES6)
|
||||
- `String.prototype.normalize` (as introduced with ES6)
|
||||
- `String.prototype.plainReplaceAll`
|
||||
|
||||
Removals:
|
||||
- `reserved` set
|
||||
- `Array.prototype.commonLeft`
|
||||
- `Function.insert`
|
||||
- `Function.remove`
|
||||
- `Function.prototype.silent`
|
||||
- `Function.prototype.wrap`
|
||||
- `Object.descriptor` Move to external `d` project.
|
||||
See: https://github.com/medikoo/d
|
||||
- `Object.diff`
|
||||
- `Object.extendDeep`
|
||||
- `Object.reduce`
|
||||
- `Object.values`
|
||||
- `String.prototype.trimCommonLeft`
|
||||
|
||||
Renames:
|
||||
- `Function.i` into `Function.identity`
|
||||
- `Function.k` into `Function.constant`
|
||||
- `Number.toInt` into `Number.toInteger`
|
||||
- `Number.toUint` into `Number.toPosInteger`
|
||||
- `Object.extend` into `Object.assign` (as introduced in ES 6)
|
||||
- `Object.extendProperties` into `Object.mixin`, with improved internal
|
||||
handling, so it matches temporarily specified `Object.mixin` for ECMAScript 6
|
||||
- `Object.isList` into `Object.isArrayLike`
|
||||
- `Object.mapToArray` into `Object.toArray` (with fixed function length)
|
||||
- `Object.toPlainObject` into `Object.normalizeOptions` (as this is the real
|
||||
use case where we use this function)
|
||||
- `Function.prototype.chain` into `Function.prototype.compose`
|
||||
- `Function.prototype.match` into `Function.prototype.spread`
|
||||
- `String.prototype.format` into `String.formatMethod`
|
||||
|
||||
Improvements & Fixes:
|
||||
- Remove workaround for primitive values handling in object iterators
|
||||
- `Array.from`: Update so it follows ES 6 spec
|
||||
- `Array.prototype.compact`: filters just null and undefined values
|
||||
(not all falsies)
|
||||
- `Array.prototype.eIndexOf` and `Array.prototype.eLastIndexOf`: fix position
|
||||
handling, improve internals
|
||||
- `Array.prototype.find`: return undefined not null, in case of not found
|
||||
(follow ES 6)
|
||||
- `Array.prototype.remove` fix function length
|
||||
- `Error.custom`: simplify, Custom class case is addressed by outer
|
||||
`error-create` project -> https://github.com/medikoo/error-create
|
||||
- `Error.isError` true only for Error instances (remove detection of host
|
||||
Exception objects)
|
||||
- `Number.prototype.pad`: Normalize negative pad
|
||||
- `Object.clear`: Handle errors same way as in `Object.assign`
|
||||
- `Object.compact`: filters just null and undefined values (not all falsies)
|
||||
- `Object.compare`: Take into account NaN values
|
||||
- `Object.copy`: Split into `Object.copy` and `Object.copyDeep`
|
||||
- `Object.isCopy`: Separate into `Object.isCopy` and `Object.isCopyDeep`, where
|
||||
`isCopyDeep` handles nested plain objects and plain arrays only
|
||||
- `String.prototype.endsWith`: Adjust up to ES6 specification
|
||||
- `String.prototype.repeat`: Adjust up to ES6 specification and improve algorithm
|
||||
- `String.prototype.simpleReplace`: Rename into `String.prototype.plainReplace`
|
||||
- `String.prototype.startsWith`: Adjust up to ES6 specification
|
||||
- Update lint rules, and adjust code to that
|
||||
- Update Travis CI configuration
|
||||
- Remove Makefile (it's cross-env utility)
|
||||
|
||||
v0.9.2 -- 2013.03.11
|
||||
Added:
|
||||
* Array.prototype.isCopy
|
||||
* Array.prototype.isUniq
|
||||
* Error.CustomError
|
||||
* Function.validFunction
|
||||
* Object.extendDeep
|
||||
* Object.descriptor.binder
|
||||
* Object.safeTraverse
|
||||
* RegExp.validRegExp
|
||||
* String.prototype.capitalize
|
||||
* String.prototype.simpleReplace
|
||||
|
||||
Fixed:
|
||||
* Fix Array.prototype.diff for sparse arrays
|
||||
* Accept primitive objects as input values in Object iteration methods and
|
||||
Object.clear, Object.count, Object.diff, Object.extend,
|
||||
Object.getPropertyNames, Object.values
|
||||
* Pass expected arguments to callbacks of Object.filter, Object.mapKeys,
|
||||
Object.mapToArray, Object.map
|
||||
* Improve callable callback support in Object.mapToArray
|
||||
|
||||
v0.9.1 -- 2012.09.17
|
||||
* Object.reduce - reduce for hash-like collections
|
||||
* Accapt any callable object as callback in Object.filter, mapKeys and map
|
||||
* Convention cleanup
|
||||
|
||||
v0.9.0 -- 2012.09.13
|
||||
We're getting to real solid API
|
||||
|
||||
Removed:
|
||||
* Function#memoize - it's grown up to be external package, to be soon published
|
||||
as 'memoizee'
|
||||
* String.guid - it doesn't fit es5-ext (extensions) concept, will be provided as
|
||||
external package
|
||||
# Function.arguments - obsolete
|
||||
# Function.context - obsolete
|
||||
# Function#flip - not readable when used, so it was never used
|
||||
# Object.clone - obsolete and confusing
|
||||
|
||||
Added:
|
||||
* String#camelToHyphen - String format convertion
|
||||
|
||||
Renamed:
|
||||
* String#dashToCamelCase -> String#hyphenToCamel
|
||||
|
||||
Fixes:
|
||||
* Object.isObject - Quote names in literals that match reserved keywords
|
||||
(older implementations crashed on that)
|
||||
* String#repeat - Do not accept negative values (coerce them to 1)
|
||||
|
||||
Improvements:
|
||||
* Array#remove - Accepts many arguments, we can now remove many values at once
|
||||
* Object iterators (forEach, map, some) - Compare function invoked with scope
|
||||
object bound to this
|
||||
* Function#curry - Algorithm cleanup
|
||||
* Object.isCopy - Support for all types, not just plain objects
|
||||
* Object.isPlainObject - Support for cross-frame objects
|
||||
* Do not memoize any of the functions, it shouldn't be decided internally
|
||||
* Remove Object.freeze calls in reserved, it's not up to convention
|
||||
* Improved documentation
|
||||
* Better linting (hard-core approach using both JSLint mod and JSHint)
|
||||
* Optional arguments are now documented in funtions signature
|
||||
|
||||
v0.8.2 -- 2012.06.22
|
||||
Fix errors in Array's intersection and exclusion methods, related to improper
|
||||
usage of contains method
|
||||
|
||||
v0.8.1 -- 2012.06.13
|
||||
Reorganized internal logic of Function.prototype.memoize. So it's more safe now
|
||||
and clears cache properly. Additionally preventCache option was provided.
|
||||
|
||||
v0.8.0 -- 2012.05.28
|
||||
Again, major overhaul. Probably last experimental stuff was trashed, all API
|
||||
looks more like standard extensions now.
|
||||
|
||||
Changes:
|
||||
* Turn all Object.prototype extensions into functions and move them to Object
|
||||
namespace. We learned that extending Object.prototype is bad idea in any case.
|
||||
* Rename Function.prototype.curry into Function.prototype.partial. This function
|
||||
is really doing partial application while currying is slightly different
|
||||
concept.
|
||||
* Convert Function.prototype.ncurry to new implementation of
|
||||
Function.prototype.curry, it now serves real curry concept additionaly it
|
||||
covers use cases for aritize and hold, which were removed.
|
||||
* Rename Array's peek to last, and provide support for sparse arrays in it
|
||||
* Rename Date's monthDaysCount into daysInMonth
|
||||
* Simplify object iterators, now order of iteration can be configured with just
|
||||
compareFn argument (no extra byKeys option)
|
||||
* Rename Object.isDuplicate to Object.isCopy
|
||||
* Rename Object.isEqual to Object.is which is compatible with future 'is'
|
||||
keyword
|
||||
* Function.memoize is now Function.prototype.memoize. Additionally clear cache
|
||||
functionality is added, and access to original arguments object.
|
||||
* Rename validation functions: assertNotNull to validValue, assertCallable to
|
||||
validCallable. validValue was moved to Object namespace. On success they now
|
||||
return validated value instead of true, it supports better composition.
|
||||
Additionally created Date.validDate and Error.validError
|
||||
* All documentation is now held in README.md not in code files.
|
||||
* Move guid to String namespace. All guids now start with numbers.
|
||||
* Array.generate: fill argument is now optional
|
||||
* Object.toArray is now Array.from (as new ES6 specification draft suggests)
|
||||
* All methods that rely on indexOf or lastIndexOf, now rely on egal (Object.is)
|
||||
versions of them (eIndexOf, eLastIndexOf)
|
||||
* Turn all get* functions that returned methods into actuall methods (get*
|
||||
functionality can still be achieved with help of Function.prototype.partial).
|
||||
So: Date.getFormat is now Date.prototype.format,
|
||||
Number.getPad is now Number.prototype.pad,
|
||||
String.getFormat is now String.prototype.format,
|
||||
String.getIndent is now String.prototype.indent,
|
||||
String.getPad is now String.prototype.pad
|
||||
* Refactored Object.descriptor, it is now just two functions, main one and
|
||||
main.gs, main is for describing values, and gs for describing getters and
|
||||
setters. Configuration is passed with first argument as string e.g. 'ce' for
|
||||
configurable and enumerable. If no configuration string is provided then by
|
||||
default it returns configurable and writable but not enumerable for value or
|
||||
configurable but not enumerable for getter/setter
|
||||
* Function.prototype.silent now returns prepared function (it was
|
||||
expected to be fixed for 0.7)
|
||||
* Reserved keywords map (reserved) is now array not hash.
|
||||
* Object.merge is now Object.extend (while former Object.extend was completely
|
||||
removed) - 'extend' implies that we change object, not creating new one (as
|
||||
'merge' may imply). Similarily Object.mergeProperties was renamed to
|
||||
Object.extendProperties
|
||||
* Position argument support in Array.prototype.contains and
|
||||
String.prototype.contains (so it follows ES6 specification draft)
|
||||
* endPosition argument support in String.prototype.endsWith and fromPosition
|
||||
argument support in String.prototype.startsWith (so it follows ES6
|
||||
specification draft)
|
||||
* Better and cleaner String.prototype.indent implementation. No default value
|
||||
for indent string argument, optional nest value (defaults to 1), remove
|
||||
nostart argument
|
||||
* Correct length values for most methods (so they reflect length of similar
|
||||
methods in standard)
|
||||
* Length argument is now optional in number and string pad methods.
|
||||
* Improve arguments validation in general, so it adheres to standard conventions
|
||||
* Fixed format of package.json
|
||||
|
||||
Removed methods and functions:
|
||||
* Object.prototype.slice - Object is not ordered collection, so slice doesn't
|
||||
make sense.
|
||||
* Function's rcurry, rncurry, s - too cumbersome for JS, not many use cases for
|
||||
that
|
||||
* Function.prototype.aritize and Function.prototype.hold - same functionality
|
||||
can be achieved with new Function.prototype.curry
|
||||
* Function.prototype.log - provided more generic Function.prototype.wrap for
|
||||
same use case
|
||||
* getNextIdGenerator - no use case for that (String.guid should be used if
|
||||
needed)
|
||||
* Object.toObject - Can be now acheived with Object(validValue(x))
|
||||
* Array.prototype.someValue - no real use case (personally used once and
|
||||
case was already controversial)
|
||||
* Date.prototype.duration - moved to external package
|
||||
* Number.getAutoincrement - No real use case
|
||||
* Object.prototype.extend, Object.prototype.override,
|
||||
Object.prototype.plainCreate, Object.prototype.plainExtend - It was probably
|
||||
too complex, same should be achieved just with Object.create,
|
||||
Object.descriptor and by saving references to super methods in local scope.
|
||||
* Object.getCompareBy - Functions should be created individually for each use
|
||||
case
|
||||
* Object.get, Object.getSet, Object.set, Object.unset - Not many use cases and
|
||||
same can be easily achieved with simple inline function
|
||||
* String.getPrefixWith - Not real use case for something that can be easily
|
||||
achieved with '+' operator
|
||||
* Object.isPrimitive - It's just negation of Object.isObject
|
||||
* Number.prototype.isLess, Number.prototype.isLessOrEqual - they shouldn't be in
|
||||
Number namespace and should rather be addressed with simple inline functions.
|
||||
* Number.prototype.subtract - Should rather be addressed with simple inline
|
||||
function
|
||||
|
||||
New methods and functions:
|
||||
* Array.prototype.lastIndex - Returns last declared index in array
|
||||
* String.prototype.last - last for strings
|
||||
* Function.prototype.wrap - Wrap function with other, it allows to specify
|
||||
before and after behavior transform return value or prevent original function
|
||||
from being called.
|
||||
* Math.sign - Returns sign of a number (already in ES6 specification draft)
|
||||
* Number.toInt - Converts value to integer (already in ES6 specification draft)
|
||||
* Number.isNaN - Returns true if value is NaN (already in ES6 specification
|
||||
draft)
|
||||
* Number.toUint - Converts value to unsigned integer
|
||||
* Number.toUint32 - Converts value to 32bit unsigned integer
|
||||
* Array.prototype.eIndexOf, eLastIndexOf - Egal version (that uses Object.is) of
|
||||
standard methods (all methods that were using native indexOf or lastIndexOf
|
||||
now uses eIndexOf and elastIndexOf respectively)
|
||||
* Array.of - as it's specified for ES6
|
||||
|
||||
Fixes:
|
||||
* Fixed binarySearch so it always returns valid list index
|
||||
* Object.isList - it failed on lists that are callable (e.g. NodeList in Nitro
|
||||
engine)
|
||||
* Object.map now supports third argument for callback
|
||||
|
||||
v0.7.1 -- 2012.01.05
|
||||
New methods:
|
||||
* Array.prototype.firstIndex - returns first valid index of array (for
|
||||
sparse arrays it may not be '0'
|
||||
|
||||
Improvements:
|
||||
* Array.prototype.first - now returns value for index returned by firstIndex
|
||||
* Object.prototype.mapToArray - can be called without callback, then array of
|
||||
key-value pairs is returned
|
||||
|
||||
Fixes
|
||||
* Array.prototype.forEachRight, object's length read through UInt32 conversion
|
||||
|
||||
v0.7.0 -- 2011.12.27
|
||||
Major update.
|
||||
Stepped back from experimental ideas and introduced more standard approach
|
||||
taking example from how ES5 methods and functions are designed. One exceptions
|
||||
is that, we don’t refrain from declaring methods for Object.prototype - it’s up
|
||||
to developer whether how he decides to use it in his context (as function or as
|
||||
method).
|
||||
|
||||
In general:
|
||||
* Removed any method 'functionalization' and functionalize method itself.
|
||||
es5-ext declares plain methods, which can be configured to work as functions
|
||||
with call.bind(method) - see documentation.
|
||||
* Removed separation of Object methods for ES5 (with descriptors) and
|
||||
ES3 (plain) - we're following ES5 idea on that, some methods are intended just
|
||||
for enumerable properties and some are for all properties, all are declared
|
||||
for Object.prototype
|
||||
* Removed separation of Array generic (collected in List folder) and not generic
|
||||
methods (collected in Array folder). Now all methods are generic and are in
|
||||
Array/prototype folder. This separation also meant, that methods in Array are
|
||||
usually destructive. We don’t do that separation now, there’s generally no use
|
||||
case for destructive iterators, we should be fine with one version of each
|
||||
method, (same as ES5 is fine with e.g. one, non destructive 'filter' method)
|
||||
* Folder structure resembles tree of native ES5 Objects
|
||||
* All methods are written with ES5 conventions in mind, it means that most
|
||||
methods are generic and can be run on any object. In more detail:
|
||||
** Array.prototype and Object.prototype methods can be run on any object (any
|
||||
not null or undefined value),
|
||||
** Date.prototype methods should be called only on Date instances.
|
||||
** Function.prototype methods can be called on any callable objects (not
|
||||
necessarily functions)
|
||||
** Number.prototype & String.prototype methods can be called on any value, in
|
||||
case of Number it it’ll be degraded to number, in case of string it’ll be
|
||||
degraded to string.
|
||||
* Travis CI support (only for Node v0.6 branch, as v0.4 has buggy V8 version)
|
||||
|
||||
Improvements for existing functions and methods:
|
||||
* Function.memoize (was Function.cache) is now fully generic, can operate on any
|
||||
type of arguments and it’s NaN safe (all NaN objects are considered equal)
|
||||
* Method properties passed to Object.prototype.extend or
|
||||
Object.prototype.override can aside of _super optionally take prototype object
|
||||
via _proto argument
|
||||
* Object iterators: forEach, mapToArray and every can now iterate in specified
|
||||
order
|
||||
* pluck, invoke and other functions that return reusable functions or methods
|
||||
have now their results memoized.
|
||||
|
||||
New methods:
|
||||
* Global: assertNotNull, getNextIdGenerator, guid, isEqual, isPrimitive,
|
||||
toObject
|
||||
* Array: generate
|
||||
* Array.prototype: binarySearch, clear, contains, diff, exclusion, find, first,
|
||||
forEachRight, group, indexesOf, intersection, remove, someRight, someValue
|
||||
* Boolean: isBoolean
|
||||
* Date: isDate
|
||||
* Function: arguments, context, insert, isArguments, remove
|
||||
* Function.prototype: not, silent
|
||||
* Number: getAutoincrement, isNumber
|
||||
* Number.prototype: isLessOrEqual, isLess, subtract
|
||||
* Object: assertCallable, descriptor (functions for clean descriptors),
|
||||
getCompareBy, isCallable, isObject
|
||||
* Object.prototype: clone (real clone), compact, count, diff, empty,
|
||||
getPropertyNames, get, keyOf, mapKeys, override, plainCreate, plainExtend,
|
||||
slice, some, unset
|
||||
* RegExp: isRegExp
|
||||
* String: getPrefixWith, isString
|
||||
* String.prototype: caseInsensitiveCompare, contains, isNumeric
|
||||
|
||||
Renamed methods:
|
||||
* Date.clone -> Date.prototype.copy
|
||||
* Date.format -> Date.getFormat
|
||||
* Date/day/floor -> Date.prototype.floorDay
|
||||
* Date/month/floor -> Date.prototype.floorMonth
|
||||
* Date/month/year -> Date.prototype.floorYear
|
||||
* Function.cache -> Function.memoize
|
||||
* Function.getApplyArg -> Function.prototype.match
|
||||
* Function.sequence -> Function.prototype.chain
|
||||
* List.findSameStartLength -> Array.prototype.commonLeft
|
||||
* Number.pad -> Number.getPad
|
||||
* Object/plain/clone -> Object.prototype.copy
|
||||
* Object/plain/elevate -> Object.prototype.flatten
|
||||
* Object/plain/same -> Object.prototype.isDuplicate
|
||||
* Object/plain/setValue -> Object.getSet
|
||||
* String.format -> String.getFormat
|
||||
* String.indent -> String.getIndent
|
||||
* String.pad -> String.getPad
|
||||
* String.trimLeftStr -> String.prototype.trimCommonLeft
|
||||
* Object.merge -> Object.prototype.mergeProperties
|
||||
* Object/plain/pluck -> Object.prototype.get
|
||||
* Array.clone is now Array.prototype.copy and can be used also on any array-like
|
||||
objects
|
||||
* List.isList -> Object.isList
|
||||
* List.toArray -> Object.prototype.toArray
|
||||
* String/convert/dashToCamelCase -> String.prototype.dashToCamelCase
|
||||
|
||||
Removed methods:
|
||||
* Array.compact - removed destructive version (that operated on same array), we
|
||||
have now non destructive version as Array.prototype.compact.
|
||||
* Function.applyBind -> use apply.bind directly
|
||||
* Function.bindBind -> use bind.bind directly
|
||||
* Function.callBind -> use call.bind directly
|
||||
* Fuction.clone -> no valid use case
|
||||
* Function.dscope -> controversial approach, shouldn’t be considered seriously
|
||||
* Function.functionalize -> It was experimental but standards are standards
|
||||
* List/sort/length -> It can be easy obtained by Object.getCompareBy(‘length’)
|
||||
* List.concat -> Concat’s for array-like’s makes no sense, just convert to array
|
||||
first
|
||||
* List.every -> Use Array.prototype.every directly
|
||||
* List.filter -> Use Array.prototype.filter directly
|
||||
* List.forEach -> User Array.prototype.forEach directly
|
||||
* List.isListObject -> No valid use case, do: isList(list) && (typeof list ===
|
||||
'object’)
|
||||
* List.map -> Use Array.prototype.map directly
|
||||
* List.reduce -> Use Array.prototype.reduce directly
|
||||
* List.shiftSame -> Use Array.prototype.commonLeft and do slice
|
||||
* List.slice -> Use Array.prototype.slice directly
|
||||
* List.some -> Use Array.prototype.some directly
|
||||
* Object.bindMethods -> it was version that considered descriptors, we have now
|
||||
Object.prototype.bindMethods which operates only on enumerable properties
|
||||
* Object.every -> version that considered all properties, we have now
|
||||
Object.prototype.every which iterates only enumerables
|
||||
* Object.invoke -> no use case
|
||||
* Object.mergeDeep -> no use case
|
||||
* Object.pluck -> no use case
|
||||
* Object.same -> it considered descriptors, now there’s only Object.isDuplicate
|
||||
which compares only enumerable properties
|
||||
* Object.sameType -> no use case
|
||||
* Object.toDescriptor and Object.toDescriptors -> replaced by much nicer
|
||||
Object.descriptor functions
|
||||
* Object/plain/link -> no use case (it was used internally only by
|
||||
Object/plain/merge)
|
||||
* Object/plain/setTrue -> now easily configurable by more universal
|
||||
Object.getSet(true)
|
||||
* String.trimRightStr -> Eventually String.prototype.trimCommonRight will be
|
||||
added
|
||||
|
||||
v0.6.3 -- 2011.12.12
|
||||
* Cleared npm warning for misnamed property in package.json
|
||||
|
||||
v0.6.2 -- 2011.08.12
|
||||
* Calling String.indent without scope (global scope then) now treated as calling
|
||||
it with null scope, it allows more direct invocations when using default nest
|
||||
string: indent().call(str, nest)
|
||||
|
||||
v0.6.1 -- 2011.08.08
|
||||
* Added TAD test suite to devDependencies, configured test commands.
|
||||
Tests can be run with 'make test' or 'npm test'
|
||||
|
||||
v0.6.0 -- 2011.08.07
|
||||
New methods:
|
||||
* Array: clone, compact (in place)
|
||||
* Date: format, duration, clone, monthDaysCount, day.floor, month.floor,
|
||||
year.floor
|
||||
* Function: getApplyArg, , ncurry, rncurry, hold, cache, log
|
||||
* List: findSameStartLength, shiftSame, peek, isListObject
|
||||
* Number: pad
|
||||
* Object: sameType, toString, mapToArray, mergeDeep, toDescriptor,
|
||||
toDescriptors, invoke
|
||||
* String: startsWith, endsWith, indent, trimLeftStr, trimRightStr, pad, format
|
||||
|
||||
Fixed:
|
||||
* Object.extend does now prototypal extend as exptected
|
||||
* Object.merge now tries to overwrite only configurable properties
|
||||
* Function.flip
|
||||
|
||||
Improved:
|
||||
* Faster List.toArray
|
||||
* Better global retrieval
|
||||
* Functionalized all Function methods
|
||||
* Renamed bindApply and bindCall to applyBind and callBind
|
||||
* Removed Function.inherit (as it's unintuitive curry clone)
|
||||
* Straightforward logic in Function.k
|
||||
* Fixed naming of some tests files (letter case issue)
|
||||
* Renamed Function.saturate into Function.lock
|
||||
* String.dashToCamelCase digits support
|
||||
* Strings now considered as List objects
|
||||
* Improved List.compact
|
||||
* Concise logic for List.concat
|
||||
* Test wit TAD in clean ES5 context
|
||||
|
||||
v0.5.1 -- 2011.07.11
|
||||
* Function's bindBind, bindCall and bindApply now more versatile
|
||||
|
||||
v0.5.0 -- 2011.07.07
|
||||
* Removed Object.is and List.apply
|
||||
* Renamed Object.plain.is to Object.plain.isPlainObject (keep naming convention
|
||||
consistent)
|
||||
* Improved documentation
|
||||
|
||||
v0.4.0 -- 2011.07.05
|
||||
* Take most functions on Object to Object.plain to keep them away from object
|
||||
descriptors
|
||||
* Object functions with ES5 standard in mind (object descriptors)
|
||||
|
||||
v0.3.0 -- 2011.06.24
|
||||
* New functions
|
||||
* Consistent file naming (dash instead of camelCase)
|
||||
|
||||
v0.2.1 -- 2011.05.28
|
||||
* Renamed Functions.K and Function.S to to lowercase versions (use consistent
|
||||
naming)
|
||||
|
||||
v0.2.0 -- 2011.05.28
|
||||
* Renamed Array folder to List (as its generic functions for array-like objects)
|
||||
* Added Makefile
|
||||
* Added various functions
|
||||
|
||||
v0.1.0 -- 2011.05.24
|
||||
* Initial version
|
15
web/node_modules/es5-ext/LICENSE
generated
vendored
Normal file
15
web/node_modules/es5-ext/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
ISC License
|
||||
|
||||
Copyright (c) 2011-2019, Mariusz Nowak, @medikoo, medikoo.com
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
1039
web/node_modules/es5-ext/README.md
generated
vendored
Normal file
1039
web/node_modules/es5-ext/README.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
10
web/node_modules/es5-ext/array/#/@@iterator/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/@@iterator/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, require("es6-symbol").iterator, {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
5
web/node_modules/es5-ext/array/#/@@iterator/index.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/array/#/@@iterator/index.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")()
|
||||
? Array.prototype[require("es6-symbol").iterator]
|
||||
: require("./shim");
|
16
web/node_modules/es5-ext/array/#/@@iterator/is-implemented.js
generated
vendored
Normal file
16
web/node_modules/es5-ext/array/#/@@iterator/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
|
||||
var iteratorSymbol = require("es6-symbol").iterator;
|
||||
|
||||
module.exports = function () {
|
||||
var arr = ["foo", 1], iterator, result;
|
||||
if (typeof arr[iteratorSymbol] !== "function") return false;
|
||||
iterator = arr[iteratorSymbol]();
|
||||
if (!iterator) return false;
|
||||
if (typeof iterator.next !== "function") return false;
|
||||
result = iterator.next();
|
||||
if (!result) return false;
|
||||
if (result.value !== "foo") return false;
|
||||
if (result.done !== false) return false;
|
||||
return true;
|
||||
};
|
3
web/node_modules/es5-ext/array/#/@@iterator/shim.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/@@iterator/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("../values/shim");
|
7
web/node_modules/es5-ext/array/#/_compare-by-length.js
generated
vendored
Normal file
7
web/node_modules/es5-ext/array/#/_compare-by-length.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Used internally to sort array of lists by length
|
||||
|
||||
"use strict";
|
||||
|
||||
var toPosInt = require("../../number/to-pos-integer");
|
||||
|
||||
module.exports = function (arr1, arr2) { return toPosInt(arr1.length) - toPosInt(arr2.length); };
|
27
web/node_modules/es5-ext/array/#/binary-search.js
generated
vendored
Normal file
27
web/node_modules/es5-ext/array/#/binary-search.js
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
"use strict";
|
||||
|
||||
var toPosInt = require("../../number/to-pos-integer")
|
||||
, callable = require("../../object/valid-callable")
|
||||
, value = require("../../object/valid-value")
|
||||
, floor = Math.floor;
|
||||
|
||||
module.exports = function (compareFn) {
|
||||
var length, low, high, middle;
|
||||
|
||||
value(this);
|
||||
callable(compareFn);
|
||||
|
||||
length = toPosInt(this.length);
|
||||
low = 0;
|
||||
high = length - 1;
|
||||
|
||||
while (low <= high) {
|
||||
middle = floor((low + high) / 2);
|
||||
if (compareFn(this[middle]) < 0) high = middle - 1;
|
||||
else low = middle + 1;
|
||||
}
|
||||
|
||||
if (high < 0) return 0;
|
||||
if (high >= length) return length - 1;
|
||||
return high;
|
||||
};
|
12
web/node_modules/es5-ext/array/#/clear.js
generated
vendored
Normal file
12
web/node_modules/es5-ext/array/#/clear.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
// Inspired by Google Closure:
|
||||
// http://closure-library.googlecode.com/svn/docs/
|
||||
// closure_goog_array_array.js.html#goog.array.clear
|
||||
|
||||
"use strict";
|
||||
|
||||
var value = require("../../object/valid-value");
|
||||
|
||||
module.exports = function () {
|
||||
value(this).length = 0;
|
||||
return this;
|
||||
};
|
11
web/node_modules/es5-ext/array/#/compact.js
generated
vendored
Normal file
11
web/node_modules/es5-ext/array/#/compact.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
// Inspired by: http://documentcloud.github.com/underscore/#compact
|
||||
|
||||
"use strict";
|
||||
|
||||
var isValue = require("../../object/is-value");
|
||||
|
||||
var filter = Array.prototype.filter;
|
||||
|
||||
module.exports = function () {
|
||||
return filter.call(this, function (val) { return isValue(val); });
|
||||
};
|
10
web/node_modules/es5-ext/array/#/concat/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/concat/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "concat", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/concat/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/concat/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.concat : require("./shim");
|
5
web/node_modules/es5-ext/array/#/concat/is-implemented.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/array/#/concat/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var SubArray = require("../../_sub-array-dummy-safe");
|
||||
|
||||
module.exports = function () { return new SubArray().concat("foo") instanceof SubArray; };
|
44
web/node_modules/es5-ext/array/#/concat/shim.js
generated
vendored
Normal file
44
web/node_modules/es5-ext/array/#/concat/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
"use strict";
|
||||
|
||||
var isPlainArray = require("../../is-plain-array")
|
||||
, toPosInt = require("../../../number/to-pos-integer")
|
||||
, isObject = require("../../../object/is-object")
|
||||
, isConcatSpreadable = require("es6-symbol").isConcatSpreadable
|
||||
, isArray = Array.isArray
|
||||
, concat = Array.prototype.concat
|
||||
, forEach = Array.prototype.forEach
|
||||
, isSpreadable;
|
||||
|
||||
isSpreadable = function (value) {
|
||||
if (!value) return false;
|
||||
if (!isObject(value)) return false;
|
||||
if (value[isConcatSpreadable] !== undefined) {
|
||||
return Boolean(value[isConcatSpreadable]);
|
||||
}
|
||||
return isArray(value);
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
module.exports = function (item/*, …items*/) {
|
||||
var result;
|
||||
if (!this || !isArray(this) || isPlainArray(this)) {
|
||||
return concat.apply(this, arguments);
|
||||
}
|
||||
result = new this.constructor();
|
||||
if (isSpreadable(this)) {
|
||||
forEach.call(this, function (val, i) { result[i] = val; });
|
||||
} else {
|
||||
result[0] = this;
|
||||
}
|
||||
forEach.call(arguments, function (arg) {
|
||||
var base;
|
||||
if (isSpreadable(arg)) {
|
||||
base = result.length;
|
||||
result.length += toPosInt(arg.length);
|
||||
forEach.call(arg, function (val, i) { result[base + i] = val; });
|
||||
return;
|
||||
}
|
||||
result.push(arg);
|
||||
});
|
||||
return result;
|
||||
};
|
7
web/node_modules/es5-ext/array/#/contains.js
generated
vendored
Normal file
7
web/node_modules/es5-ext/array/#/contains.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
var indexOf = require("./e-index-of");
|
||||
|
||||
module.exports = function (searchElement/*, position*/) {
|
||||
return indexOf.call(this, searchElement, arguments[1]) > -1;
|
||||
};
|
10
web/node_modules/es5-ext/array/#/copy-within/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/copy-within/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "copyWithin", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/copy-within/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/copy-within/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.copyWithin : require("./shim");
|
7
web/node_modules/es5-ext/array/#/copy-within/is-implemented.js
generated
vendored
Normal file
7
web/node_modules/es5-ext/array/#/copy-within/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function () {
|
||||
var arr = [1, 2, 3, 4, 5];
|
||||
if (typeof arr.copyWithin !== "function") return false;
|
||||
return String(arr.copyWithin(1, 3)) === "1,4,5,4,5";
|
||||
};
|
45
web/node_modules/es5-ext/array/#/copy-within/shim.js
generated
vendored
Normal file
45
web/node_modules/es5-ext/array/#/copy-within/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
// Taken from: https://github.com/paulmillr/es6-shim/
|
||||
|
||||
"use strict";
|
||||
|
||||
var toInteger = require("../../../number/to-integer")
|
||||
, toPosInt = require("../../../number/to-pos-integer")
|
||||
, validValue = require("../../../object/valid-value")
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty
|
||||
, max = Math.max
|
||||
, min = Math.min;
|
||||
|
||||
module.exports = function (target, start/*, end*/) {
|
||||
var arr = validValue(this)
|
||||
, end = arguments[2]
|
||||
, length = toPosInt(arr.length)
|
||||
, to
|
||||
, from
|
||||
, fin
|
||||
, count
|
||||
, direction;
|
||||
|
||||
target = toInteger(target);
|
||||
start = toInteger(start);
|
||||
end = end === undefined ? length : toInteger(end);
|
||||
|
||||
to = target < 0 ? max(length + target, 0) : min(target, length);
|
||||
from = start < 0 ? max(length + start, 0) : min(start, length);
|
||||
fin = end < 0 ? max(length + end, 0) : min(end, length);
|
||||
count = min(fin - from, length - to);
|
||||
direction = 1;
|
||||
|
||||
if (from < to && to < from + count) {
|
||||
direction = -1;
|
||||
from += count - 1;
|
||||
to += count - 1;
|
||||
}
|
||||
while (count > 0) {
|
||||
if (objHasOwnProperty.call(arr, from)) arr[to] = arr[from];
|
||||
else delete arr[from];
|
||||
from += direction;
|
||||
to += direction;
|
||||
count -= 1;
|
||||
}
|
||||
return arr;
|
||||
};
|
11
web/node_modules/es5-ext/array/#/diff.js
generated
vendored
Normal file
11
web/node_modules/es5-ext/array/#/diff.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
"use strict";
|
||||
|
||||
var value = require("../../object/valid-value")
|
||||
, contains = require("./contains")
|
||||
, filter = Array.prototype.filter;
|
||||
|
||||
module.exports = function (other) {
|
||||
value(this);
|
||||
value(other);
|
||||
return filter.call(this, function (item) { return !contains.call(other, item); });
|
||||
};
|
28
web/node_modules/es5-ext/array/#/e-index-of.js
generated
vendored
Normal file
28
web/node_modules/es5-ext/array/#/e-index-of.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
"use strict";
|
||||
|
||||
var numberIsNaN = require("../../number/is-nan")
|
||||
, toPosInt = require("../../number/to-pos-integer")
|
||||
, value = require("../../object/valid-value")
|
||||
, indexOf = Array.prototype.indexOf
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty
|
||||
, abs = Math.abs
|
||||
, floor = Math.floor;
|
||||
|
||||
module.exports = function (searchElement/*, fromIndex*/) {
|
||||
var i, length, fromIndex, val;
|
||||
if (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments);
|
||||
|
||||
length = toPosInt(value(this).length);
|
||||
fromIndex = arguments[1];
|
||||
if (isNaN(fromIndex)) fromIndex = 0;
|
||||
else if (fromIndex >= 0) fromIndex = floor(fromIndex);
|
||||
else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
|
||||
|
||||
for (i = fromIndex; i < length; ++i) {
|
||||
if (objHasOwnProperty.call(this, i)) {
|
||||
val = this[i];
|
||||
if (numberIsNaN(val)) return i; // Jslint: ignore
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
31
web/node_modules/es5-ext/array/#/e-last-index-of.js
generated
vendored
Normal file
31
web/node_modules/es5-ext/array/#/e-last-index-of.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
"use strict";
|
||||
|
||||
var numberIsNaN = require("../../number/is-nan")
|
||||
, toPosInt = require("../../number/to-pos-integer")
|
||||
, value = require("../../object/valid-value")
|
||||
, lastIndexOf = Array.prototype.lastIndexOf
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty
|
||||
, abs = Math.abs
|
||||
, floor = Math.floor;
|
||||
|
||||
module.exports = function (searchElement/*, fromIndex*/) {
|
||||
var i, fromIndex, val;
|
||||
if (!numberIsNaN(searchElement)) {
|
||||
// Jslint: ignore
|
||||
return lastIndexOf.apply(this, arguments);
|
||||
}
|
||||
|
||||
value(this);
|
||||
fromIndex = arguments[1];
|
||||
if (isNaN(fromIndex)) fromIndex = toPosInt(this.length) - 1;
|
||||
else if (fromIndex >= 0) fromIndex = floor(fromIndex);
|
||||
else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
|
||||
|
||||
for (i = fromIndex; i >= 0; --i) {
|
||||
if (objHasOwnProperty.call(this, i)) {
|
||||
val = this[i];
|
||||
if (numberIsNaN(val)) return i; // Jslint: ignore
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
10
web/node_modules/es5-ext/array/#/entries/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/entries/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "entries", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/entries/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/entries/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.entries : require("./shim");
|
15
web/node_modules/es5-ext/array/#/entries/is-implemented.js
generated
vendored
Normal file
15
web/node_modules/es5-ext/array/#/entries/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function () {
|
||||
var arr = [1, "foo"], iterator, result;
|
||||
if (typeof arr.entries !== "function") return false;
|
||||
iterator = arr.entries();
|
||||
if (!iterator) return false;
|
||||
if (typeof iterator.next !== "function") return false;
|
||||
result = iterator.next();
|
||||
if (!result || !result.value) return false;
|
||||
if (result.value[0] !== 0) return false;
|
||||
if (result.value[1] !== 1) return false;
|
||||
if (result.done !== false) return false;
|
||||
return true;
|
||||
};
|
4
web/node_modules/es5-ext/array/#/entries/shim.js
generated
vendored
Normal file
4
web/node_modules/es5-ext/array/#/entries/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
"use strict";
|
||||
|
||||
var ArrayIterator = require("es6-iterator/array");
|
||||
module.exports = function () { return new ArrayIterator(this, "key+value"); };
|
25
web/node_modules/es5-ext/array/#/exclusion.js
generated
vendored
Normal file
25
web/node_modules/es5-ext/array/#/exclusion.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
"use strict";
|
||||
|
||||
var value = require("../../object/valid-value")
|
||||
, aFrom = require("../from")
|
||||
, toArray = require("../to-array")
|
||||
, contains = require("./contains")
|
||||
, byLength = require("./_compare-by-length")
|
||||
, filter = Array.prototype.filter
|
||||
, push = Array.prototype.push;
|
||||
|
||||
module.exports = function (/* …lists*/) {
|
||||
var lists, seen, result;
|
||||
if (!arguments.length) return aFrom(this);
|
||||
push.apply((lists = [this]), arguments);
|
||||
lists.forEach(value);
|
||||
seen = [];
|
||||
result = [];
|
||||
lists.sort(byLength).forEach(function (list) {
|
||||
result = result
|
||||
.filter(function (item) { return !contains.call(list, item); })
|
||||
.concat(filter.call(list, function (item) { return !contains.call(seen, item); }));
|
||||
push.apply(seen, toArray(list));
|
||||
});
|
||||
return result;
|
||||
};
|
10
web/node_modules/es5-ext/array/#/fill/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/fill/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "fill", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/fill/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/fill/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.fill : require("./shim");
|
7
web/node_modules/es5-ext/array/#/fill/is-implemented.js
generated
vendored
Normal file
7
web/node_modules/es5-ext/array/#/fill/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function () {
|
||||
var arr = [1, 2, 3, 4, 5, 6];
|
||||
if (typeof arr.fill !== "function") return false;
|
||||
return String(arr.fill(-1, -3)) === "1,2,3,-1,-1,-1";
|
||||
};
|
25
web/node_modules/es5-ext/array/#/fill/shim.js
generated
vendored
Normal file
25
web/node_modules/es5-ext/array/#/fill/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Taken from: https://github.com/paulmillr/es6-shim/
|
||||
|
||||
"use strict";
|
||||
|
||||
var toInteger = require("../../../number/to-integer")
|
||||
, toPosInt = require("../../../number/to-pos-integer")
|
||||
, validValue = require("../../../object/valid-value")
|
||||
, max = Math.max
|
||||
, min = Math.min;
|
||||
|
||||
module.exports = function (value/*, start, end*/) {
|
||||
var arr = validValue(this)
|
||||
, start = arguments[1]
|
||||
, end = arguments[2]
|
||||
, length = toPosInt(arr.length)
|
||||
, relativeStart
|
||||
, i;
|
||||
|
||||
start = start === undefined ? 0 : toInteger(start);
|
||||
end = end === undefined ? length : toInteger(end);
|
||||
|
||||
relativeStart = start < 0 ? max(length + start, 0) : min(start, length);
|
||||
for (i = relativeStart; i < length && i < end; ++i) arr[i] = value;
|
||||
return arr;
|
||||
};
|
10
web/node_modules/es5-ext/array/#/filter/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/filter/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "filter", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/filter/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/filter/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.filter : require("./shim");
|
6
web/node_modules/es5-ext/array/#/filter/is-implemented.js
generated
vendored
Normal file
6
web/node_modules/es5-ext/array/#/filter/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
var SubArray = require("../../_sub-array-dummy-safe")
|
||||
, pass = function () { return true; };
|
||||
|
||||
module.exports = function () { return new SubArray().filter(pass) instanceof SubArray; };
|
23
web/node_modules/es5-ext/array/#/filter/shim.js
generated
vendored
Normal file
23
web/node_modules/es5-ext/array/#/filter/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
"use strict";
|
||||
|
||||
var isPlainArray = require("../../is-plain-array")
|
||||
, callable = require("../../../object/valid-callable")
|
||||
, isArray = Array.isArray
|
||||
, filter = Array.prototype.filter
|
||||
, forEach = Array.prototype.forEach
|
||||
, call = Function.prototype.call;
|
||||
|
||||
module.exports = function (callbackFn/*, thisArg*/) {
|
||||
var result, thisArg, i;
|
||||
if (!this || !isArray(this) || isPlainArray(this)) {
|
||||
return filter.apply(this, arguments);
|
||||
}
|
||||
callable(callbackFn);
|
||||
thisArg = arguments[1];
|
||||
result = new this.constructor();
|
||||
i = 0;
|
||||
forEach.call(this, function (val, j, self) {
|
||||
if (call.call(callbackFn, thisArg, val, j, self)) result[i++] = val;
|
||||
});
|
||||
return result;
|
||||
};
|
10
web/node_modules/es5-ext/array/#/find-index/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/find-index/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "findIndex", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/find-index/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/find-index/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.findIndex : require("./shim");
|
9
web/node_modules/es5-ext/array/#/find-index/is-implemented.js
generated
vendored
Normal file
9
web/node_modules/es5-ext/array/#/find-index/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
var fn = function (value) { return value > 3; };
|
||||
|
||||
module.exports = function () {
|
||||
var arr = [1, 2, 3, 4, 5, 6];
|
||||
if (typeof arr.findIndex !== "function") return false;
|
||||
return arr.findIndex(fn) === 3;
|
||||
};
|
26
web/node_modules/es5-ext/array/#/find-index/shim.js
generated
vendored
Normal file
26
web/node_modules/es5-ext/array/#/find-index/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
"use strict";
|
||||
|
||||
var callable = require("../../../object/valid-callable")
|
||||
, ensureValue = require("../../../object/valid-value")
|
||||
, some = Array.prototype.some
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function (predicate/*, thisArg*/) {
|
||||
var k, self;
|
||||
self = Object(ensureValue(this));
|
||||
callable(predicate);
|
||||
|
||||
return some.call(
|
||||
self,
|
||||
function (value, index) {
|
||||
if (apply.call(predicate, this, arguments)) {
|
||||
k = index;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
arguments[1]
|
||||
)
|
||||
? k
|
||||
: -1;
|
||||
};
|
10
web/node_modules/es5-ext/array/#/find/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/find/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "find", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/find/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/find/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.find : require("./shim");
|
9
web/node_modules/es5-ext/array/#/find/is-implemented.js
generated
vendored
Normal file
9
web/node_modules/es5-ext/array/#/find/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
var fn = function (value) { return value > 3; };
|
||||
|
||||
module.exports = function () {
|
||||
var arr = [1, 2, 3, 4, 5, 6];
|
||||
if (typeof arr.find !== "function") return false;
|
||||
return arr.find(fn) === 4;
|
||||
};
|
9
web/node_modules/es5-ext/array/#/find/shim.js
generated
vendored
Normal file
9
web/node_modules/es5-ext/array/#/find/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
var findIndex = require("../find-index/shim");
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
module.exports = function (predicate/*, thisArg*/) {
|
||||
var index = findIndex.apply(this, arguments);
|
||||
return index === -1 ? undefined : this[index];
|
||||
};
|
15
web/node_modules/es5-ext/array/#/first-index.js
generated
vendored
Normal file
15
web/node_modules/es5-ext/array/#/first-index.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
var toPosInt = require("../../number/to-pos-integer")
|
||||
, value = require("../../object/valid-value")
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
module.exports = function () {
|
||||
var i, length;
|
||||
if (!(length = toPosInt(value(this).length))) return null;
|
||||
i = 0;
|
||||
while (!objHasOwnProperty.call(this, i)) {
|
||||
if (++i === length) return null;
|
||||
}
|
||||
return i;
|
||||
};
|
9
web/node_modules/es5-ext/array/#/first.js
generated
vendored
Normal file
9
web/node_modules/es5-ext/array/#/first.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
var firstIndex = require("./first-index");
|
||||
|
||||
module.exports = function () {
|
||||
var i;
|
||||
if ((i = firstIndex.call(this)) !== null) return this[i];
|
||||
return undefined;
|
||||
};
|
40
web/node_modules/es5-ext/array/#/flatten.js
generated
vendored
Normal file
40
web/node_modules/es5-ext/array/#/flatten.js
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
// Stack grow safe implementation
|
||||
|
||||
"use strict";
|
||||
|
||||
var ensureValue = require("../../object/valid-value")
|
||||
, isArray = Array.isArray
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
module.exports = function () {
|
||||
var input = ensureValue(this), index = 0, remaining, remainingIndexes, length, i, result = [];
|
||||
// Jslint: ignore
|
||||
main: while (input) {
|
||||
length = input.length;
|
||||
for (i = index; i < length; ++i) {
|
||||
if (!objHasOwnProperty.call(input, i)) continue;
|
||||
if (isArray(input[i])) {
|
||||
if (i < length - 1) {
|
||||
// eslint-disable-next-line max-depth
|
||||
if (!remaining) {
|
||||
remaining = [];
|
||||
remainingIndexes = [];
|
||||
}
|
||||
remaining.push(input);
|
||||
remainingIndexes.push(i + 1);
|
||||
}
|
||||
input = input[i];
|
||||
index = 0;
|
||||
continue main;
|
||||
}
|
||||
result.push(input[i]);
|
||||
}
|
||||
if (remaining) {
|
||||
input = remaining.pop();
|
||||
index = remainingIndexes.pop();
|
||||
} else {
|
||||
input = null;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
19
web/node_modules/es5-ext/array/#/for-each-right.js
generated
vendored
Normal file
19
web/node_modules/es5-ext/array/#/for-each-right.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
|
||||
var toPosInt = require("../../number/to-pos-integer")
|
||||
, callable = require("../../object/valid-callable")
|
||||
, value = require("../../object/valid-value")
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty
|
||||
, call = Function.prototype.call;
|
||||
|
||||
module.exports = function (cb/*, thisArg*/) {
|
||||
var i, self, thisArg;
|
||||
|
||||
self = Object(value(this));
|
||||
callable(cb);
|
||||
thisArg = arguments[1];
|
||||
|
||||
for (i = toPosInt(self.length) - 1; i >= 0; --i) {
|
||||
if (objHasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self);
|
||||
}
|
||||
};
|
28
web/node_modules/es5-ext/array/#/group.js
generated
vendored
Normal file
28
web/node_modules/es5-ext/array/#/group.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
// Inspired by Underscore's groupBy:
|
||||
// http://documentcloud.github.com/underscore/#groupBy
|
||||
|
||||
"use strict";
|
||||
|
||||
var callable = require("../../object/valid-callable")
|
||||
, value = require("../../object/valid-value")
|
||||
, forEach = Array.prototype.forEach
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function (cb/*, thisArg*/) {
|
||||
var result;
|
||||
|
||||
value(this);
|
||||
callable(cb);
|
||||
|
||||
result = Object.create(null);
|
||||
forEach.call(
|
||||
this,
|
||||
function (item) {
|
||||
var key = apply.call(cb, this, arguments);
|
||||
if (!result[key]) result[key] = [];
|
||||
result[key].push(item);
|
||||
},
|
||||
arguments[1]
|
||||
);
|
||||
return result;
|
||||
};
|
41
web/node_modules/es5-ext/array/#/index.js
generated
vendored
Normal file
41
web/node_modules/es5-ext/array/#/index.js
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"@@iterator": require("./@@iterator"),
|
||||
"binarySearch": require("./binary-search"),
|
||||
"clear": require("./clear"),
|
||||
"compact": require("./compact"),
|
||||
"concat": require("./concat"),
|
||||
"contains": require("./contains"),
|
||||
"copyWithin": require("./copy-within"),
|
||||
"diff": require("./diff"),
|
||||
"eIndexOf": require("./e-index-of"),
|
||||
"eLastIndexOf": require("./e-last-index-of"),
|
||||
"entries": require("./entries"),
|
||||
"exclusion": require("./exclusion"),
|
||||
"fill": require("./fill"),
|
||||
"filter": require("./filter"),
|
||||
"find": require("./find"),
|
||||
"findIndex": require("./find-index"),
|
||||
"first": require("./first"),
|
||||
"firstIndex": require("./first-index"),
|
||||
"flatten": require("./flatten"),
|
||||
"forEachRight": require("./for-each-right"),
|
||||
"keys": require("./keys"),
|
||||
"group": require("./group"),
|
||||
"indexesOf": require("./indexes-of"),
|
||||
"intersection": require("./intersection"),
|
||||
"isCopy": require("./is-copy"),
|
||||
"isEmpty": require("./is-empty"),
|
||||
"isUniq": require("./is-uniq"),
|
||||
"last": require("./last"),
|
||||
"lastIndex": require("./last-index"),
|
||||
"map": require("./map"),
|
||||
"remove": require("./remove"),
|
||||
"separate": require("./separate"),
|
||||
"slice": require("./slice"),
|
||||
"someRight": require("./some-right"),
|
||||
"splice": require("./splice"),
|
||||
"uniq": require("./uniq"),
|
||||
"values": require("./values")
|
||||
};
|
12
web/node_modules/es5-ext/array/#/indexes-of.js
generated
vendored
Normal file
12
web/node_modules/es5-ext/array/#/indexes-of.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
"use strict";
|
||||
|
||||
var indexOf = require("./e-index-of");
|
||||
|
||||
module.exports = function (value/*, fromIndex*/) {
|
||||
var result = [], i, fromIndex = arguments[1];
|
||||
while ((i = indexOf.call(this, value, fromIndex)) !== -1) {
|
||||
result.push(i);
|
||||
fromIndex = i + 1;
|
||||
}
|
||||
return result;
|
||||
};
|
19
web/node_modules/es5-ext/array/#/intersection.js
generated
vendored
Normal file
19
web/node_modules/es5-ext/array/#/intersection.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
|
||||
var value = require("../../object/valid-value")
|
||||
, contains = require("./contains")
|
||||
, byLength = require("./_compare-by-length")
|
||||
, filter = Array.prototype.filter
|
||||
, push = Array.prototype.push
|
||||
, slice = Array.prototype.slice;
|
||||
|
||||
module.exports = function (/* …list*/) {
|
||||
var lists;
|
||||
if (!arguments.length) slice.call(this);
|
||||
push.apply((lists = [this]), arguments);
|
||||
lists.forEach(value);
|
||||
lists.sort(byLength);
|
||||
return lists.reduce(function (list1, list2) {
|
||||
return filter.call(list1, function (item) { return contains.call(list2, item); });
|
||||
});
|
||||
};
|
21
web/node_modules/es5-ext/array/#/is-copy.js
generated
vendored
Normal file
21
web/node_modules/es5-ext/array/#/is-copy.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
"use strict";
|
||||
|
||||
var toPosInt = require("../../number/to-pos-integer")
|
||||
, eq = require("../../object/eq")
|
||||
, value = require("../../object/valid-value")
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
module.exports = function (other) {
|
||||
var i, length;
|
||||
value(this);
|
||||
value(other);
|
||||
length = toPosInt(this.length);
|
||||
if (length !== toPosInt(other.length)) return false;
|
||||
for (i = 0; i < length; ++i) {
|
||||
if (objHasOwnProperty.call(this, i) !== objHasOwnProperty.call(other, i)) {
|
||||
return false;
|
||||
}
|
||||
if (!eq(this[i], other[i])) return false;
|
||||
}
|
||||
return true;
|
||||
};
|
6
web/node_modules/es5-ext/array/#/is-empty.js
generated
vendored
Normal file
6
web/node_modules/es5-ext/array/#/is-empty.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
var ensureArray = require("../../object/ensure-array")
|
||||
, firstIndex = require("./first-index");
|
||||
|
||||
module.exports = function () { return firstIndex.call(ensureArray(this)) === null; };
|
9
web/node_modules/es5-ext/array/#/is-uniq.js
generated
vendored
Normal file
9
web/node_modules/es5-ext/array/#/is-uniq.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
var indexOf = require("./e-index-of")
|
||||
, every = Array.prototype.every
|
||||
, isFirst;
|
||||
|
||||
isFirst = function (value, index) { return indexOf.call(this, value) === index; };
|
||||
|
||||
module.exports = function () { return every.call(this, isFirst, this); };
|
10
web/node_modules/es5-ext/array/#/keys/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/keys/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "keys", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/keys/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/keys/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.keys : require("./shim");
|
14
web/node_modules/es5-ext/array/#/keys/is-implemented.js
generated
vendored
Normal file
14
web/node_modules/es5-ext/array/#/keys/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function () {
|
||||
var arr = [1, "foo"], iterator, result;
|
||||
if (typeof arr.keys !== "function") return false;
|
||||
iterator = arr.keys();
|
||||
if (!iterator) return false;
|
||||
if (typeof iterator.next !== "function") return false;
|
||||
result = iterator.next();
|
||||
if (!result) return false;
|
||||
if (result.value !== 0) return false;
|
||||
if (result.done !== false) return false;
|
||||
return true;
|
||||
};
|
4
web/node_modules/es5-ext/array/#/keys/shim.js
generated
vendored
Normal file
4
web/node_modules/es5-ext/array/#/keys/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
"use strict";
|
||||
|
||||
var ArrayIterator = require("es6-iterator/array");
|
||||
module.exports = function () { return new ArrayIterator(this, "key"); };
|
15
web/node_modules/es5-ext/array/#/last-index.js
generated
vendored
Normal file
15
web/node_modules/es5-ext/array/#/last-index.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
var toPosInt = require("../../number/to-pos-integer")
|
||||
, value = require("../../object/valid-value")
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
module.exports = function () {
|
||||
var i, length;
|
||||
if (!(length = toPosInt(value(this).length))) return null;
|
||||
i = length - 1;
|
||||
while (!objHasOwnProperty.call(this, i)) {
|
||||
if (--i === -1) return null;
|
||||
}
|
||||
return i;
|
||||
};
|
9
web/node_modules/es5-ext/array/#/last.js
generated
vendored
Normal file
9
web/node_modules/es5-ext/array/#/last.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
var lastIndex = require("./last-index");
|
||||
|
||||
module.exports = function () {
|
||||
var i;
|
||||
if ((i = lastIndex.call(this)) !== null) return this[i];
|
||||
return undefined;
|
||||
};
|
10
web/node_modules/es5-ext/array/#/map/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/map/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "map", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/map/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/map/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.map : require("./shim");
|
6
web/node_modules/es5-ext/array/#/map/is-implemented.js
generated
vendored
Normal file
6
web/node_modules/es5-ext/array/#/map/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
var identity = require("../../../function/identity")
|
||||
, SubArray = require("../../_sub-array-dummy-safe");
|
||||
|
||||
module.exports = function () { return new SubArray().map(identity) instanceof SubArray; };
|
22
web/node_modules/es5-ext/array/#/map/shim.js
generated
vendored
Normal file
22
web/node_modules/es5-ext/array/#/map/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
"use strict";
|
||||
|
||||
var isPlainArray = require("../../is-plain-array")
|
||||
, callable = require("../../../object/valid-callable")
|
||||
, isArray = Array.isArray
|
||||
, map = Array.prototype.map
|
||||
, forEach = Array.prototype.forEach
|
||||
, call = Function.prototype.call;
|
||||
|
||||
module.exports = function (callbackFn/*, thisArg*/) {
|
||||
var result, thisArg;
|
||||
if (!this || !isArray(this) || isPlainArray(this)) {
|
||||
return map.apply(this, arguments);
|
||||
}
|
||||
callable(callbackFn);
|
||||
thisArg = arguments[1];
|
||||
result = new this.constructor(this.length);
|
||||
forEach.call(this, function (val, i, self) {
|
||||
result[i] = call.call(callbackFn, thisArg, val, i, self);
|
||||
});
|
||||
return result;
|
||||
};
|
17
web/node_modules/es5-ext/array/#/remove.js
generated
vendored
Normal file
17
web/node_modules/es5-ext/array/#/remove.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
"use strict";
|
||||
|
||||
var indexOf = require("./e-index-of")
|
||||
, forEach = Array.prototype.forEach
|
||||
, splice = Array.prototype.splice;
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
module.exports = function (itemToRemove/*, …item*/) {
|
||||
forEach.call(
|
||||
arguments,
|
||||
function (item) {
|
||||
var index = indexOf.call(this, item);
|
||||
if (index !== -1) splice.call(this, index, 1);
|
||||
},
|
||||
this
|
||||
);
|
||||
};
|
10
web/node_modules/es5-ext/array/#/separate.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/separate.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
var forEach = Array.prototype.forEach;
|
||||
|
||||
module.exports = function (sep) {
|
||||
var result = [];
|
||||
forEach.call(this, function (val) { result.push(val, sep); });
|
||||
result.pop();
|
||||
return result;
|
||||
};
|
10
web/node_modules/es5-ext/array/#/slice/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/slice/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "slice", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/slice/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/slice/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.slice : require("./shim");
|
5
web/node_modules/es5-ext/array/#/slice/is-implemented.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/array/#/slice/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var SubArray = require("../../_sub-array-dummy-safe");
|
||||
|
||||
module.exports = function () { return new SubArray().slice() instanceof SubArray; };
|
36
web/node_modules/es5-ext/array/#/slice/shim.js
generated
vendored
Normal file
36
web/node_modules/es5-ext/array/#/slice/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
"use strict";
|
||||
|
||||
var toInteger = require("../../../number/to-integer")
|
||||
, toPosInt = require("../../../number/to-pos-integer")
|
||||
, isPlainArray = require("../../is-plain-array")
|
||||
, isArray = Array.isArray
|
||||
, slice = Array.prototype.slice
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty
|
||||
, max = Math.max;
|
||||
|
||||
module.exports = function (start, end) {
|
||||
var length, result, i;
|
||||
if (!this || !isArray(this) || isPlainArray(this)) {
|
||||
return slice.apply(this, arguments);
|
||||
}
|
||||
length = toPosInt(this.length);
|
||||
start = toInteger(start);
|
||||
if (start < 0) start = max(length + start, 0);
|
||||
else if (start > length) start = length;
|
||||
if (end === undefined) {
|
||||
end = length;
|
||||
} else {
|
||||
end = toInteger(end);
|
||||
if (end < 0) end = max(length + end, 0);
|
||||
else if (end > length) end = length;
|
||||
}
|
||||
if (start > end) start = end;
|
||||
result = new this.constructor(end - start);
|
||||
i = 0;
|
||||
while (start !== end) {
|
||||
if (objHasOwnProperty.call(this, start)) result[i] = this[start];
|
||||
++i;
|
||||
++start;
|
||||
}
|
||||
return result;
|
||||
};
|
21
web/node_modules/es5-ext/array/#/some-right.js
generated
vendored
Normal file
21
web/node_modules/es5-ext/array/#/some-right.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
"use strict";
|
||||
|
||||
var toPosInt = require("../../number/to-pos-integer")
|
||||
, callable = require("../../object/valid-callable")
|
||||
, value = require("../../object/valid-value")
|
||||
, objHasOwnProperty = Object.prototype.hasOwnProperty
|
||||
, call = Function.prototype.call;
|
||||
|
||||
module.exports = function (cb/*, thisArg*/) {
|
||||
var i, self, thisArg;
|
||||
self = Object(value(this));
|
||||
callable(cb);
|
||||
thisArg = arguments[1];
|
||||
|
||||
for (i = toPosInt(self.length) - 1; i >= 0; --i) {
|
||||
if (objHasOwnProperty.call(self, i) && call.call(cb, thisArg, self[i], i, self)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
10
web/node_modules/es5-ext/array/#/splice/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/splice/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "splice", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/splice/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/splice/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.splice : require("./shim");
|
5
web/node_modules/es5-ext/array/#/splice/is-implemented.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/array/#/splice/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var SubArray = require("../../_sub-array-dummy-safe");
|
||||
|
||||
module.exports = function () { return new SubArray().splice(0) instanceof SubArray; };
|
15
web/node_modules/es5-ext/array/#/splice/shim.js
generated
vendored
Normal file
15
web/node_modules/es5-ext/array/#/splice/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
var isPlainArray = require("../../is-plain-array")
|
||||
, isArray = Array.isArray
|
||||
, splice = Array.prototype.splice
|
||||
, forEach = Array.prototype.forEach;
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
module.exports = function (start, deleteCount/*, …items*/) {
|
||||
var arr = splice.apply(this, arguments), result;
|
||||
if (!this || !isArray(this) || isPlainArray(this)) return arr;
|
||||
result = new this.constructor(arr.length);
|
||||
forEach.call(arr, function (val, i) { result[i] = val; });
|
||||
return result;
|
||||
};
|
9
web/node_modules/es5-ext/array/#/uniq.js
generated
vendored
Normal file
9
web/node_modules/es5-ext/array/#/uniq.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
var indexOf = require("./e-index-of")
|
||||
, filter = Array.prototype.filter
|
||||
, isFirst;
|
||||
|
||||
isFirst = function (value, index) { return indexOf.call(this, value) === index; };
|
||||
|
||||
module.exports = function () { return filter.call(this, isFirst, this); };
|
10
web/node_modules/es5-ext/array/#/values/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/#/values/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array.prototype, "values", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/#/values/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/#/values/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.values : require("./shim");
|
14
web/node_modules/es5-ext/array/#/values/is-implemented.js
generated
vendored
Normal file
14
web/node_modules/es5-ext/array/#/values/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function () {
|
||||
var arr = ["foo", 1], iterator, result;
|
||||
if (typeof arr.values !== "function") return false;
|
||||
iterator = arr.values();
|
||||
if (!iterator) return false;
|
||||
if (typeof iterator.next !== "function") return false;
|
||||
result = iterator.next();
|
||||
if (!result) return false;
|
||||
if (result.value !== "foo") return false;
|
||||
if (result.done !== false) return false;
|
||||
return true;
|
||||
};
|
4
web/node_modules/es5-ext/array/#/values/shim.js
generated
vendored
Normal file
4
web/node_modules/es5-ext/array/#/values/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
"use strict";
|
||||
|
||||
var ArrayIterator = require("es6-iterator/array");
|
||||
module.exports = function () { return new ArrayIterator(this, "value"); };
|
14
web/node_modules/es5-ext/array/_is-extensible.js
generated
vendored
Normal file
14
web/node_modules/es5-ext/array/_is-extensible.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = (function () {
|
||||
var SubArray = require("./_sub-array-dummy")
|
||||
, arr;
|
||||
|
||||
if (!SubArray) return false;
|
||||
arr = new SubArray();
|
||||
if (!Array.isArray(arr)) return false;
|
||||
if (!(arr instanceof SubArray)) return false;
|
||||
|
||||
arr[34] = "foo";
|
||||
return arr.length === 35;
|
||||
})();
|
22
web/node_modules/es5-ext/array/_sub-array-dummy-safe.js
generated
vendored
Normal file
22
web/node_modules/es5-ext/array/_sub-array-dummy-safe.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
"use strict";
|
||||
|
||||
var setPrototypeOf = require("../object/set-prototype-of")
|
||||
, isExtensible = require("./_is-extensible");
|
||||
|
||||
module.exports = (function () {
|
||||
var SubArray;
|
||||
|
||||
if (isExtensible) return require("./_sub-array-dummy");
|
||||
|
||||
if (!setPrototypeOf) return null;
|
||||
SubArray = function () {
|
||||
var arr = Array.apply(this, arguments);
|
||||
setPrototypeOf(arr, SubArray.prototype);
|
||||
return arr;
|
||||
};
|
||||
setPrototypeOf(SubArray, Array);
|
||||
SubArray.prototype = Object.create(Array.prototype, {
|
||||
constructor: { value: SubArray, enumerable: false, writable: true, configurable: true }
|
||||
});
|
||||
return SubArray;
|
||||
})();
|
15
web/node_modules/es5-ext/array/_sub-array-dummy.js
generated
vendored
Normal file
15
web/node_modules/es5-ext/array/_sub-array-dummy.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
var setPrototypeOf = require("../object/set-prototype-of");
|
||||
|
||||
module.exports = (function () {
|
||||
var SubArray;
|
||||
|
||||
if (!setPrototypeOf) return null;
|
||||
SubArray = function () { Array.apply(this, arguments); };
|
||||
setPrototypeOf(SubArray, Array);
|
||||
SubArray.prototype = Object.create(Array.prototype, {
|
||||
constructor: { value: SubArray, enumerable: false, writable: true, configurable: true }
|
||||
});
|
||||
return SubArray;
|
||||
})();
|
10
web/node_modules/es5-ext/array/from/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/from/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array, "from", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/from/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/from/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.from : require("./shim");
|
9
web/node_modules/es5-ext/array/from/is-implemented.js
generated
vendored
Normal file
9
web/node_modules/es5-ext/array/from/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function () {
|
||||
var from = Array.from, arr, result;
|
||||
if (typeof from !== "function") return false;
|
||||
arr = ["raz", "dwa"];
|
||||
result = from(arr);
|
||||
return Boolean(result && result !== arr && result[1] === "dwa");
|
||||
};
|
119
web/node_modules/es5-ext/array/from/shim.js
generated
vendored
Normal file
119
web/node_modules/es5-ext/array/from/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,119 @@
|
|||
"use strict";
|
||||
|
||||
var iteratorSymbol = require("es6-symbol").iterator
|
||||
, isArguments = require("../../function/is-arguments")
|
||||
, isFunction = require("../../function/is-function")
|
||||
, toPosInt = require("../../number/to-pos-integer")
|
||||
, callable = require("../../object/valid-callable")
|
||||
, validValue = require("../../object/valid-value")
|
||||
, isValue = require("../../object/is-value")
|
||||
, isString = require("../../string/is-string")
|
||||
, isArray = Array.isArray
|
||||
, call = Function.prototype.call
|
||||
, desc = { configurable: true, enumerable: true, writable: true, value: null }
|
||||
, defineProperty = Object.defineProperty;
|
||||
|
||||
// eslint-disable-next-line complexity, max-lines-per-function
|
||||
module.exports = function (arrayLike/*, mapFn, thisArg*/) {
|
||||
var mapFn = arguments[1]
|
||||
, thisArg = arguments[2]
|
||||
, Context
|
||||
, i
|
||||
, j
|
||||
, arr
|
||||
, length
|
||||
, code
|
||||
, iterator
|
||||
, result
|
||||
, getIterator
|
||||
, value;
|
||||
|
||||
arrayLike = Object(validValue(arrayLike));
|
||||
|
||||
if (isValue(mapFn)) callable(mapFn);
|
||||
if (!this || this === Array || !isFunction(this)) {
|
||||
// Result: Plain array
|
||||
if (!mapFn) {
|
||||
if (isArguments(arrayLike)) {
|
||||
// Source: Arguments
|
||||
length = arrayLike.length;
|
||||
if (length !== 1) return Array.apply(null, arrayLike);
|
||||
arr = new Array(1);
|
||||
arr[0] = arrayLike[0];
|
||||
return arr;
|
||||
}
|
||||
if (isArray(arrayLike)) {
|
||||
// Source: Array
|
||||
arr = new Array((length = arrayLike.length));
|
||||
for (i = 0; i < length; ++i) arr[i] = arrayLike[i];
|
||||
return arr;
|
||||
}
|
||||
}
|
||||
arr = [];
|
||||
} else {
|
||||
// Result: Non plain array
|
||||
Context = this;
|
||||
}
|
||||
|
||||
if (!isArray(arrayLike)) {
|
||||
if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {
|
||||
// Source: Iterator
|
||||
iterator = callable(getIterator).call(arrayLike);
|
||||
if (Context) arr = new Context();
|
||||
result = iterator.next();
|
||||
i = 0;
|
||||
while (!result.done) {
|
||||
value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
|
||||
if (Context) {
|
||||
desc.value = value;
|
||||
defineProperty(arr, i, desc);
|
||||
} else {
|
||||
arr[i] = value;
|
||||
}
|
||||
result = iterator.next();
|
||||
++i;
|
||||
}
|
||||
length = i;
|
||||
} else if (isString(arrayLike)) {
|
||||
// Source: String
|
||||
length = arrayLike.length;
|
||||
if (Context) arr = new Context();
|
||||
for (i = 0, j = 0; i < length; ++i) {
|
||||
value = arrayLike[i];
|
||||
if (i + 1 < length) {
|
||||
code = value.charCodeAt(0);
|
||||
// eslint-disable-next-line max-depth
|
||||
if (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];
|
||||
}
|
||||
value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
|
||||
if (Context) {
|
||||
desc.value = value;
|
||||
defineProperty(arr, j, desc);
|
||||
} else {
|
||||
arr[j] = value;
|
||||
}
|
||||
++j;
|
||||
}
|
||||
length = j;
|
||||
}
|
||||
}
|
||||
if (length === undefined) {
|
||||
// Source: array or array-like
|
||||
length = toPosInt(arrayLike.length);
|
||||
if (Context) arr = new Context(length);
|
||||
for (i = 0; i < length; ++i) {
|
||||
value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
|
||||
if (Context) {
|
||||
desc.value = value;
|
||||
defineProperty(arr, i, desc);
|
||||
} else {
|
||||
arr[i] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Context) {
|
||||
desc.value = null;
|
||||
arr.length = length;
|
||||
}
|
||||
return arr;
|
||||
};
|
18
web/node_modules/es5-ext/array/generate.js
generated
vendored
Normal file
18
web/node_modules/es5-ext/array/generate.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
"use strict";
|
||||
|
||||
var toPosInt = require("../number/to-pos-integer")
|
||||
, value = require("../object/valid-value")
|
||||
, slice = Array.prototype.slice;
|
||||
|
||||
module.exports = function (length/*, …fill*/) {
|
||||
var arr, currentLength;
|
||||
length = toPosInt(value(length));
|
||||
if (length === 0) return [];
|
||||
|
||||
arr = arguments.length < 2 ? [undefined] : slice.call(arguments, 1, 1 + length);
|
||||
|
||||
while ((currentLength = arr.length) < length) {
|
||||
arr = arr.concat(arr.slice(0, length - currentLength));
|
||||
}
|
||||
return arr;
|
||||
};
|
11
web/node_modules/es5-ext/array/index.js
generated
vendored
Normal file
11
web/node_modules/es5-ext/array/index.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"#": require("./#"),
|
||||
"from": require("./from"),
|
||||
"generate": require("./generate"),
|
||||
"isPlainArray": require("./is-plain-array"),
|
||||
"of": require("./of"),
|
||||
"toArray": require("./to-array"),
|
||||
"validArray": require("./valid-array")
|
||||
};
|
11
web/node_modules/es5-ext/array/is-plain-array.js
generated
vendored
Normal file
11
web/node_modules/es5-ext/array/is-plain-array.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
"use strict";
|
||||
|
||||
var isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf;
|
||||
|
||||
module.exports = function (obj) {
|
||||
var proto;
|
||||
if (!obj || !isArray(obj)) return false;
|
||||
proto = getPrototypeOf(obj);
|
||||
if (!isArray(proto)) return false;
|
||||
return !isArray(getPrototypeOf(proto));
|
||||
};
|
10
web/node_modules/es5-ext/array/of/implement.js
generated
vendored
Normal file
10
web/node_modules/es5-ext/array/of/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Array, "of", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
3
web/node_modules/es5-ext/array/of/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/array/of/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.of : require("./shim");
|
8
web/node_modules/es5-ext/array/of/is-implemented.js
generated
vendored
Normal file
8
web/node_modules/es5-ext/array/of/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function () {
|
||||
var of = Array.of, result;
|
||||
if (typeof of !== "function") return false;
|
||||
result = of("foo", "bar");
|
||||
return Boolean(result && result[1] === "bar");
|
||||
};
|
19
web/node_modules/es5-ext/array/of/shim.js
generated
vendored
Normal file
19
web/node_modules/es5-ext/array/of/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
|
||||
var isFunction = require("../../function/is-function")
|
||||
, slice = Array.prototype.slice
|
||||
, defineProperty = Object.defineProperty
|
||||
, desc = { configurable: true, enumerable: true, writable: true, value: null };
|
||||
|
||||
module.exports = function (/* …items*/) {
|
||||
var result, i, length;
|
||||
if (!this || this === Array || !isFunction(this)) return slice.call(arguments);
|
||||
result = new this((length = arguments.length));
|
||||
for (i = 0; i < length; ++i) {
|
||||
desc.value = arguments[i];
|
||||
defineProperty(result, i, desc);
|
||||
}
|
||||
desc.value = null;
|
||||
result.length = length;
|
||||
return result;
|
||||
};
|
6
web/node_modules/es5-ext/array/to-array.js
generated
vendored
Normal file
6
web/node_modules/es5-ext/array/to-array.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
var from = require("./from")
|
||||
, isArray = Array.isArray;
|
||||
|
||||
module.exports = function (arrayLike) { return isArray(arrayLike) ? arrayLike : from(arrayLike); };
|
8
web/node_modules/es5-ext/array/valid-array.js
generated
vendored
Normal file
8
web/node_modules/es5-ext/array/valid-array.js
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
"use strict";
|
||||
|
||||
var isArray = Array.isArray;
|
||||
|
||||
module.exports = function (value) {
|
||||
if (isArray(value)) return value;
|
||||
throw new TypeError(value + " is not an array");
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue