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
1,271 changed files
with
69,235 additions
and
16,621 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, | ||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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,18 @@ | ||
# lodash._arrayincludes v4.0.0 | ||
|
||
The internal [lodash](https://lodash.com/) function `arrayIncludes` exported as a [Node.js](https://nodejs.org/) module. | ||
|
||
## Installation | ||
|
||
Using npm: | ||
```bash | ||
$ {sudo -H} npm i -g npm | ||
$ npm i --save lodash._arrayincludes | ||
``` | ||
|
||
In Node.js: | ||
```js | ||
var arrayIncludes = require('lodash._arrayincludes'); | ||
``` | ||
|
||
See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._arrayincludes) for more details. |
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,69 @@ | ||
/** | ||
* lodash 4.0.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
|
||
/** | ||
* A specialized version of `_.includes` for arrays without support for | ||
* specifying an index to search from. | ||
* | ||
* @private | ||
* @param {Array} array The array to search. | ||
* @param {*} target The value to search for. | ||
* @returns {boolean} Returns `true` if `target` is found, else `false`. | ||
*/ | ||
function arrayIncludes(array, value) { | ||
return !!array.length && baseIndexOf(array, value, 0) > -1; | ||
} | ||
|
||
/** | ||
* The base implementation of `_.indexOf` without `fromIndex` bounds checks. | ||
* | ||
* @private | ||
* @param {Array} array The array to search. | ||
* @param {*} value The value to search for. | ||
* @param {number} fromIndex The index to search from. | ||
* @returns {number} Returns the index of the matched value, else `-1`. | ||
*/ | ||
function baseIndexOf(array, value, fromIndex) { | ||
if (value !== value) { | ||
return indexOfNaN(array, fromIndex); | ||
} | ||
var index = fromIndex - 1, | ||
length = array.length; | ||
|
||
while (++index < length) { | ||
if (array[index] === value) { | ||
return index; | ||
} | ||
} | ||
return -1; | ||
} | ||
|
||
/** | ||
* Gets the index at which the first occurrence of `NaN` is found in `array`. | ||
* | ||
* @private | ||
* @param {Array} array The array to search. | ||
* @param {number} fromIndex The index to search from. | ||
* @param {boolean} [fromRight] Specify iterating from right to left. | ||
* @returns {number} Returns the index of the matched `NaN`, else `-1`. | ||
*/ | ||
function indexOfNaN(array, fromIndex, fromRight) { | ||
var length = array.length, | ||
index = fromIndex + (fromRight ? 0 : -1); | ||
|
||
while ((fromRight ? index-- : ++index < length)) { | ||
var other = array[index]; | ||
if (other !== other) { | ||
return index; | ||
} | ||
} | ||
return -1; | ||
} | ||
|
||
module.exports = arrayIncludes; |
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,16 @@ | ||
{ | ||
"name": "lodash._arrayincludes", | ||
"version": "4.0.0", | ||
"description": "The internal lodash function `arrayIncludes` exported as a module.", | ||
"homepage": "https://lodash.com/", | ||
"icon": "https://lodash.com/icon.svg", | ||
"license": "MIT", | ||
"author": "John-David Dalton <[email protected]> (http://allyoucanleet.com/)", | ||
"contributors": [ | ||
"John-David Dalton <[email protected]> (http://allyoucanleet.com/)", | ||
"Blaine Bublitz <[email protected]> (https://github.com/phated)", | ||
"Mathias Bynens <[email protected]> (https://mathiasbynens.be/)" | ||
], | ||
"repository": "lodash/lodash", | ||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } | ||
} |
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 @@ | ||
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, | ||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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,18 @@ | ||
# lodash._arrayincludeswith v4.0.0 | ||
|
||
The internal [lodash](https://lodash.com/) function `arrayIncludesWith` exported as a [Node.js](https://nodejs.org/) module. | ||
|
||
## Installation | ||
|
||
Using npm: | ||
```bash | ||
$ {sudo -H} npm i -g npm | ||
$ npm i --save lodash._arrayincludeswith | ||
``` | ||
|
||
In Node.js: | ||
```js | ||
var arrayIncludesWith = require('lodash._arrayincludeswith'); | ||
``` | ||
|
||
See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._arrayincludeswith) for more details. |
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 @@ | ||
/** | ||
* lodash 4.0.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
|
||
/** | ||
* A specialized version of `_.includesWith` for arrays without support for | ||
* specifying an index to search from. | ||
* | ||
* @private | ||
* @param {Array} array The array to search. | ||
* @param {*} target The value to search for. | ||
* @param {Function} comparator The comparator invoked per element. | ||
* @returns {boolean} Returns `true` if `target` is found, else `false`. | ||
*/ | ||
function arrayIncludesWith(array, value, comparator) { | ||
var index = -1, | ||
length = array.length; | ||
|
||
while (++index < length) { | ||
if (comparator(value, array[index])) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
||
module.exports = arrayIncludesWith; |
Oops, something went wrong.