standaardisation updates
This commit is contained in:
22
convert/lodash/lodash.foreach/LICENSE.txt
Normal file
22
convert/lodash/lodash.foreach/LICENSE.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js 1.5.2, copyright 2009-2013 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.
|
||||
15
convert/lodash/lodash.foreach/README.md
Normal file
15
convert/lodash/lodash.foreach/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# lodash.foreach v2.3.0
|
||||
|
||||
The [Lo-Dash](http://lodash.com/) function [`_.forEach`](http://lodash.com/docs#forEach) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).
|
||||
|
||||
## Author
|
||||
|
||||
| [](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
|
||||
|---|
|
||||
| [John-David Dalton](http://allyoucanleet.com/) |
|
||||
|
||||
## Contributors
|
||||
|
||||
| [](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|
||||
|---|---|---|
|
||||
| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
|
||||
55
convert/lodash/lodash.foreach/index.js
Normal file
55
convert/lodash/lodash.foreach/index.js
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>
|
||||
* Build: `lodash modularize modern exports="npm" -o ./npm/`
|
||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <http://lodash.com/license>
|
||||
*/
|
||||
var baseCreateCallback = require('./../lodash._basecreatecallback'),
|
||||
forOwn = require('./../lodash.forown');
|
||||
|
||||
/**
|
||||
* Iterates over elements of a collection, executing the callback for each
|
||||
* element. The callback is bound to `thisArg` and invoked with three arguments;
|
||||
* (value, index|key, collection). Callbacks may exit iteration early by
|
||||
* explicitly returning `false`.
|
||||
*
|
||||
* Note: As with other "Collections" methods, objects with a `length` property
|
||||
* are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
|
||||
* may be used for object iteration.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @alias each
|
||||
* @category Collections
|
||||
* @param {Array|Object|string} collection The collection to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array|Object|string} Returns `collection`.
|
||||
* @example
|
||||
*
|
||||
* _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(',');
|
||||
* // => logs each number and returns '1,2,3'
|
||||
*
|
||||
* _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); });
|
||||
* // => logs each number and returns the object (property order is not guaranteed across environments)
|
||||
*/
|
||||
function forEach(collection, callback, thisArg) {
|
||||
var index = -1,
|
||||
length = collection ? collection.length : 0;
|
||||
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
if (typeof length == 'number') {
|
||||
while (++index < length) {
|
||||
if (callback(collection[index], index, collection) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
forOwn(collection, callback);
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
|
||||
module.exports = forEach;
|
||||
21
convert/lodash/lodash.foreach/package.json
Normal file
21
convert/lodash/lodash.foreach/package.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "lodash.foreach",
|
||||
"version": "2.3.0",
|
||||
"description": "The Lo-Dash function `_.forEach` as a Node.js module generated by lodash-cli.",
|
||||
"homepage": "http://lodash.com/custom-builds",
|
||||
"license": "MIT",
|
||||
"keywords": ["functional", "lodash", "lodash-modularized", "server", "util"],
|
||||
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"contributors": [
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
|
||||
],
|
||||
"bugs": "https://github.com/lodash/lodash-cli/issues",
|
||||
"repository": { "type": "git", "url": "https://github.com/lodash/lodash-cli.git" },
|
||||
"dependencies": {
|
||||
"lodash._basecreatecallback": "~2.3.0",
|
||||
"lodash.forown": "~2.3.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user