forked from lodash/lodash
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
745 changed files
with
19,699 additions
and
140,151 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
import getNative from './_getNative.js'; | ||
import root from './_root.js'; | ||
|
||
/* 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,32 @@ | ||
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'; | ||
|
||
/** | ||
* 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,32 @@ | ||
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'; | ||
|
||
/** | ||
* 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,7 @@ | ||
import getNative from './_getNative.js'; | ||
import root from './_root.js'; | ||
|
||
/* 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,32 @@ | ||
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'; | ||
|
||
/** | ||
* 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,7 @@ | ||
import getNative from './_getNative.js'; | ||
import root from './_root.js'; | ||
|
||
/* 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,7 @@ | ||
import getNative from './_getNative.js'; | ||
import root from './_root.js'; | ||
|
||
/* 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,27 @@ | ||
import MapCache from './_MapCache.js'; | ||
import setCacheAdd from './_setCacheAdd.js'; | ||
import setCacheHas from './_setCacheHas.js'; | ||
|
||
/** | ||
* | ||
* 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,27 @@ | ||
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'; | ||
|
||
/** | ||
* 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,6 @@ | ||
import root from './_root.js'; | ||
|
||
/** 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,6 @@ | ||
import root from './_root.js'; | ||
|
||
/** 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,7 @@ | ||
import getNative from './_getNative.js'; | ||
import root from './_root.js'; | ||
|
||
/* 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,15 @@ | ||
/** | ||
* Adds the key-value `pair` to `map`. | ||
* | ||
* @private | ||
* @param {Object} map The map to modify. | ||
* @param {Array} pair The key-value pair to add. | ||
* @returns {Object} Returns `map`. | ||
*/ | ||
function addMapEntry(map, pair) { | ||
// Don't return `map.set` because it's not chainable in IE 11. | ||
map.set(pair[0], pair[1]); | ||
return map; | ||
} | ||
|
||
export default addMapEntry; |
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,15 @@ | ||
/** | ||
* Adds `value` to `set`. | ||
* | ||
* @private | ||
* @param {Object} set The set to modify. | ||
* @param {*} value The value to add. | ||
* @returns {Object} Returns `set`. | ||
*/ | ||
function addSetEntry(set, value) { | ||
// Don't return `set.add` because it's not chainable in IE 11. | ||
set.add(value); | ||
return set; | ||
} | ||
|
||
export default addSetEntry; |
Oops, something went wrong.