-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a8f239
commit 50a5274
Showing
105 changed files
with
2,688 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import getNative from './_getNative.js'; | ||
import root from './_root.js'; | ||
|
||
'use strict'; | ||
|
||
/* Built-in method references that are verified to be native. */ | ||
var DataView = getNative(root, 'DataView'); | ||
|
||
export default DataView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import hashClear from './_hashClear.js'; | ||
import hashDelete from './_hashDelete.js'; | ||
import hashGet from './_hashGet.js'; | ||
import hashHas from './_hashHas.js'; | ||
import hashSet from './_hashSet.js'; | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Creates a hash object. | ||
* | ||
* @private | ||
* @constructor | ||
* @param {Array} [entries] The key-value pairs to cache. | ||
*/ | ||
function Hash(entries) { | ||
var index = -1, | ||
length = entries == null ? 0 : entries.length; | ||
|
||
this.clear(); | ||
while (++index < length) { | ||
var entry = entries[index]; | ||
this.set(entry[0], entry[1]); | ||
} | ||
} | ||
|
||
// Add methods to `Hash`. | ||
Hash.prototype.clear = hashClear; | ||
Hash.prototype['delete'] = hashDelete; | ||
Hash.prototype.get = hashGet; | ||
Hash.prototype.has = hashHas; | ||
Hash.prototype.set = hashSet; | ||
|
||
export default Hash; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import listCacheClear from './_listCacheClear.js'; | ||
import listCacheDelete from './_listCacheDelete.js'; | ||
import listCacheGet from './_listCacheGet.js'; | ||
import listCacheHas from './_listCacheHas.js'; | ||
import listCacheSet from './_listCacheSet.js'; | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Creates an list cache object. | ||
* | ||
* @private | ||
* @constructor | ||
* @param {Array} [entries] The key-value pairs to cache. | ||
*/ | ||
function ListCache(entries) { | ||
var index = -1, | ||
length = entries == null ? 0 : entries.length; | ||
|
||
this.clear(); | ||
while (++index < length) { | ||
var entry = entries[index]; | ||
this.set(entry[0], entry[1]); | ||
} | ||
} | ||
|
||
// Add methods to `ListCache`. | ||
ListCache.prototype.clear = listCacheClear; | ||
ListCache.prototype['delete'] = listCacheDelete; | ||
ListCache.prototype.get = listCacheGet; | ||
ListCache.prototype.has = listCacheHas; | ||
ListCache.prototype.set = listCacheSet; | ||
|
||
export default ListCache; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import getNative from './_getNative.js'; | ||
import root from './_root.js'; | ||
|
||
'use strict'; | ||
|
||
/* Built-in method references that are verified to be native. */ | ||
var Map = getNative(root, 'Map'); | ||
|
||
export default Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import mapCacheClear from './_mapCacheClear.js'; | ||
import mapCacheDelete from './_mapCacheDelete.js'; | ||
import mapCacheGet from './_mapCacheGet.js'; | ||
import mapCacheHas from './_mapCacheHas.js'; | ||
import mapCacheSet from './_mapCacheSet.js'; | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Creates a map cache object to store key-value pairs. | ||
* | ||
* @private | ||
* @constructor | ||
* @param {Array} [entries] The key-value pairs to cache. | ||
*/ | ||
function MapCache(entries) { | ||
var index = -1, | ||
length = entries == null ? 0 : entries.length; | ||
|
||
this.clear(); | ||
while (++index < length) { | ||
var entry = entries[index]; | ||
this.set(entry[0], entry[1]); | ||
} | ||
} | ||
|
||
// Add methods to `MapCache`. | ||
MapCache.prototype.clear = mapCacheClear; | ||
MapCache.prototype['delete'] = mapCacheDelete; | ||
MapCache.prototype.get = mapCacheGet; | ||
MapCache.prototype.has = mapCacheHas; | ||
MapCache.prototype.set = mapCacheSet; | ||
|
||
export default MapCache; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import getNative from './_getNative.js'; | ||
import root from './_root.js'; | ||
|
||
'use strict'; | ||
|
||
/* Built-in method references that are verified to be native. */ | ||
var Promise = getNative(root, 'Promise'); | ||
|
||
export default Promise; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import getNative from './_getNative.js'; | ||
import root from './_root.js'; | ||
|
||
'use strict'; | ||
|
||
/* Built-in method references that are verified to be native. */ | ||
var Set = getNative(root, 'Set'); | ||
|
||
export default Set; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import MapCache from './_MapCache.js'; | ||
import setCacheAdd from './_setCacheAdd.js'; | ||
import setCacheHas from './_setCacheHas.js'; | ||
|
||
'use strict'; | ||
|
||
/** | ||
* | ||
* Creates an array cache object to store unique values. | ||
* | ||
* @private | ||
* @constructor | ||
* @param {Array} [values] The values to cache. | ||
*/ | ||
function SetCache(values) { | ||
var index = -1, | ||
length = values == null ? 0 : values.length; | ||
|
||
this.__data__ = new MapCache; | ||
while (++index < length) { | ||
this.add(values[index]); | ||
} | ||
} | ||
|
||
// Add methods to `SetCache`. | ||
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; | ||
SetCache.prototype.has = setCacheHas; | ||
|
||
export default SetCache; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import ListCache from './_ListCache.js'; | ||
import stackClear from './_stackClear.js'; | ||
import stackDelete from './_stackDelete.js'; | ||
import stackGet from './_stackGet.js'; | ||
import stackHas from './_stackHas.js'; | ||
import stackSet from './_stackSet.js'; | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Creates a stack cache object to store key-value pairs. | ||
* | ||
* @private | ||
* @constructor | ||
* @param {Array} [entries] The key-value pairs to cache. | ||
*/ | ||
function Stack(entries) { | ||
var data = this.__data__ = new ListCache(entries); | ||
this.size = data.size; | ||
} | ||
|
||
// Add methods to `Stack`. | ||
Stack.prototype.clear = stackClear; | ||
Stack.prototype['delete'] = stackDelete; | ||
Stack.prototype.get = stackGet; | ||
Stack.prototype.has = stackHas; | ||
Stack.prototype.set = stackSet; | ||
|
||
export default Stack; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import root from './_root.js'; | ||
|
||
'use strict'; | ||
|
||
/** Built-in value references. */ | ||
var Symbol = root.Symbol; | ||
|
||
export default Symbol; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import root from './_root.js'; | ||
|
||
'use strict'; | ||
|
||
/** Built-in value references. */ | ||
var Uint8Array = root.Uint8Array; | ||
|
||
export default Uint8Array; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import getNative from './_getNative.js'; | ||
import root from './_root.js'; | ||
|
||
'use strict'; | ||
|
||
/* Built-in method references that are verified to be native. */ | ||
var WeakMap = getNative(root, 'WeakMap'); | ||
|
||
export default WeakMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use strict'; | ||
|
||
/** | ||
* A specialized version of `_.filter` for arrays without support for | ||
* iteratee shorthands. | ||
* | ||
* @private | ||
* @param {Array} [array] The array to iterate over. | ||
* @param {Function} predicate The function invoked per iteration. | ||
* @returns {Array} Returns the new filtered array. | ||
*/ | ||
function arrayFilter(array, predicate) { | ||
var index = -1, | ||
length = array == null ? 0 : array.length, | ||
resIndex = 0, | ||
result = []; | ||
|
||
while (++index < length) { | ||
var value = array[index]; | ||
if (predicate(value, index, array)) { | ||
result[resIndex++] = value; | ||
} | ||
} | ||
return result; | ||
} | ||
|
||
export default arrayFilter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import baseTimes from './_baseTimes.js'; | ||
import isArguments from './isArguments.js'; | ||
import isArray from './isArray.js'; | ||
import isBuffer from './isBuffer.js'; | ||
import isIndex from './_isIndex.js'; | ||
import isTypedArray from './isTypedArray.js'; | ||
|
||
'use strict'; | ||
|
||
/** Used for built-in method references. */ | ||
var objectProto = Object.prototype; | ||
|
||
/** Used to check objects for own properties. */ | ||
var hasOwnProperty = objectProto.hasOwnProperty; | ||
|
||
/** | ||
* Creates an array of the enumerable property names of the array-like `value`. | ||
* | ||
* @private | ||
* @param {*} value The value to query. | ||
* @param {boolean} inherited Specify returning inherited property names. | ||
* @returns {Array} Returns the array of property names. | ||
*/ | ||
function arrayLikeKeys(value, inherited) { | ||
var isArr = isArray(value), | ||
isArg = !isArr && isArguments(value), | ||
isBuff = !isArr && !isArg && isBuffer(value), | ||
isType = !isArr && !isArg && !isBuff && isTypedArray(value), | ||
skipIndexes = isArr || isArg || isBuff || isType, | ||
result = skipIndexes ? baseTimes(value.length, String) : [], | ||
length = result.length; | ||
|
||
for (var key in value) { | ||
if ((inherited || hasOwnProperty.call(value, key)) && | ||
!(skipIndexes && ( | ||
// Safari 9 has enumerable `arguments.length` in strict mode. | ||
key == 'length' || | ||
// Node.js 0.10 has enumerable non-index properties on buffers. | ||
(isBuff && (key == 'offset' || key == 'parent')) || | ||
// PhantomJS 2 has enumerable non-index properties on typed arrays. | ||
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || | ||
// Skip index properties. | ||
isIndex(key, length) | ||
))) { | ||
result.push(key); | ||
} | ||
} | ||
return result; | ||
} | ||
|
||
export default arrayLikeKeys; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict'; | ||
|
||
/** | ||
* Appends the elements of `values` to `array`. | ||
* | ||
* @private | ||
* @param {Array} array The array to modify. | ||
* @param {Array} values The values to append. | ||
* @returns {Array} Returns `array`. | ||
*/ | ||
function arrayPush(array, values) { | ||
var index = -1, | ||
length = values.length, | ||
offset = array.length; | ||
|
||
while (++index < length) { | ||
array[offset + index] = values[index]; | ||
} | ||
return array; | ||
} | ||
|
||
export default arrayPush; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
/** | ||
* A specialized version of `_.some` for arrays without support for iteratee | ||
* shorthands. | ||
* | ||
* @private | ||
* @param {Array} [array] The array to iterate over. | ||
* @param {Function} predicate The function invoked per iteration. | ||
* @returns {boolean} Returns `true` if any element passes the predicate check, | ||
* else `false`. | ||
*/ | ||
function arraySome(array, predicate) { | ||
var index = -1, | ||
length = array == null ? 0 : array.length; | ||
|
||
while (++index < length) { | ||
if (predicate(array[index], index, array)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
||
export default arraySome; |
Oops, something went wrong.