mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Update vendors, builds, and docs.
This commit is contained in:
45
dist/lodash.underscore.js
vendored
45
dist/lodash.underscore.js
vendored
@@ -1474,7 +1474,7 @@
|
||||
* Creates a shallow clone of `object` excluding the specified properties.
|
||||
* Property names may be specified as individual arguments or as arrays of
|
||||
* property names. If a callback is provided it will be executed for each
|
||||
* property of `object` omitting the properties the callback returns truthy
|
||||
* property of `object` omitting the properties the callback returns truey
|
||||
* for. The callback is bound to `thisArg` and invoked with three arguments;
|
||||
* (value, key, object).
|
||||
*
|
||||
@@ -1540,7 +1540,7 @@
|
||||
* Creates a shallow clone of `object` composed of the specified properties.
|
||||
* Property names may be specified as individual arguments or as arrays of
|
||||
* property names. If a callback is provided it will be executed for each
|
||||
* property of `object` picking the properties the callback returns truthy
|
||||
* property of `object` picking the properties the callback returns truey
|
||||
* for. The callback is bound to `thisArg` and invoked with three arguments;
|
||||
* (value, key, object).
|
||||
*
|
||||
@@ -1685,7 +1685,7 @@
|
||||
});
|
||||
|
||||
/**
|
||||
* Checks if the given callback returns truthy value for **all** elements of
|
||||
* Checks if the given callback returns truey value for **all** elements of
|
||||
* a collection. The callback is bound to `thisArg` and invoked with three
|
||||
* arguments; (value, index|key, collection).
|
||||
*
|
||||
@@ -1748,7 +1748,7 @@
|
||||
|
||||
/**
|
||||
* Iterates over elements of a collection, returning an array of all elements
|
||||
* the callback returns truthy for. The callback is bound to `thisArg` and
|
||||
* the callback returns truey for. The callback is bound to `thisArg` and
|
||||
* invoked with three arguments; (value, index|key, collection).
|
||||
*
|
||||
* If a property name is provided for `callback` the created "_.pluck" style
|
||||
@@ -1812,7 +1812,7 @@
|
||||
|
||||
/**
|
||||
* Iterates over elements of a collection, returning the first element that
|
||||
* the callback returns truthy for. The callback is bound to `thisArg` and
|
||||
* the callback returns truey for. The callback is bound to `thisArg` and
|
||||
* invoked with three arguments; (value, index|key, collection).
|
||||
*
|
||||
* If a property name is provided for `callback` the created "_.pluck" style
|
||||
@@ -2364,7 +2364,7 @@
|
||||
|
||||
/**
|
||||
* The opposite of `_.filter` this method returns the elements of a
|
||||
* collection that the callback does **not** return truthy for.
|
||||
* collection that the callback does **not** return truey for.
|
||||
*
|
||||
* If a property name is provided for `callback` the created "_.pluck" style
|
||||
* callback will return the property value of the given element.
|
||||
@@ -2460,7 +2460,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the callback returns a truthy value for **any** element of a
|
||||
* Checks if the callback returns a truey value for **any** element of a
|
||||
* collection. The function returns as soon as it finds a passing value and
|
||||
* does not iterate over the entire collection. The callback is bound to
|
||||
* `thisArg` and invoked with three arguments; (value, index|key, collection).
|
||||
@@ -2697,7 +2697,7 @@
|
||||
/**
|
||||
* Gets the first element or first `n` elements of an array. If a callback
|
||||
* is provided elements at the beginning of the array are returned as long
|
||||
* as the callback returns truthy. The callback is bound to `thisArg` and
|
||||
* as the callback returns truey. The callback is bound to `thisArg` and
|
||||
* invoked with three arguments; (value, index, array).
|
||||
*
|
||||
* If a property name is provided for `callback` the created "_.pluck" style
|
||||
@@ -2773,7 +2773,7 @@
|
||||
|
||||
/**
|
||||
* Flattens a nested array (the nesting can be to any depth). If `isShallow`
|
||||
* is truthy, the array will only be flattened a single level. If a callback
|
||||
* is truey, the array will only be flattened a single level. If a callback
|
||||
* is provided each element of the array is passed through the callback before
|
||||
* flattening. The callback is bound to `thisArg` and invoked with three
|
||||
* arguments; (value, index, array).
|
||||
@@ -2854,7 +2854,7 @@
|
||||
/**
|
||||
* Gets all but the last element or last `n` elements of an array. If a
|
||||
* callback is provided elements at the end of the array are excluded from
|
||||
* the result as long as the callback returns truthy. The callback is bound
|
||||
* the result as long as the callback returns truey. The callback is bound
|
||||
* to `thisArg` and invoked with three arguments; (value, index, array).
|
||||
*
|
||||
* If a property name is provided for `callback` the created "_.pluck" style
|
||||
@@ -2966,7 +2966,7 @@
|
||||
/**
|
||||
* Gets the last element or last `n` elements of an array. If a callback is
|
||||
* provided elements at the end of the array are returned as long as the
|
||||
* callback returns truthy. The callback is bound to `thisArg` and invoked
|
||||
* callback returns truey. The callback is bound to `thisArg` and invoked
|
||||
* with three arguments; (value, index, array).
|
||||
*
|
||||
* If a property name is provided for `callback` the created "_.pluck" style
|
||||
@@ -3129,7 +3129,7 @@
|
||||
* The opposite of `_.initial` this method gets all but the first element or
|
||||
* first `n` elements of an array. If a callback function is provided elements
|
||||
* at the beginning of the array are excluded from the result as long as the
|
||||
* callback returns truthy. The callback is bound to `thisArg` and invoked
|
||||
* callback returns truey. The callback is bound to `thisArg` and invoked
|
||||
* with three arguments; (value, index, array).
|
||||
*
|
||||
* If a property name is provided for `callback` the created "_.pluck" style
|
||||
@@ -3421,8 +3421,8 @@
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function this is restricted to executing `func` with the `this`
|
||||
* binding and arguments of the created function, only after it is called `n` times.
|
||||
* Creates a function that executes `func`, with the `this` binding and
|
||||
* arguments of the created function, only after being called `n` times.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -3433,11 +3433,16 @@
|
||||
* @returns {Function} Returns the new restricted function.
|
||||
* @example
|
||||
*
|
||||
* var renderNotes = _.after(notes.length, render);
|
||||
* _.forEach(notes, function(note) {
|
||||
* note.asyncSave({ 'success': renderNotes });
|
||||
* var saves = ['profile', 'settings'];
|
||||
*
|
||||
* var done = _.after(saves.length, function() {
|
||||
* console.log('Done saving!');
|
||||
* });
|
||||
* // `renderNotes` is run once, after all notes have saved
|
||||
*
|
||||
* _.forEach(saves, function(type) {
|
||||
* asyncSave({ 'type': type, 'complete': done });
|
||||
* });
|
||||
* // => logs 'Done saving!', after all saves have completed
|
||||
*/
|
||||
function after(n, func) {
|
||||
if (!isFunction(func)) {
|
||||
@@ -4172,7 +4177,7 @@
|
||||
* is given, else it returns the interpolated text.
|
||||
* @example
|
||||
*
|
||||
* // using a compiled template
|
||||
* // using the "interpolate" delimiter to create a compiled template
|
||||
* var compiled = _.template('hello <%= name %>');
|
||||
* compiled({ 'name': 'moe' });
|
||||
* // => 'hello moe'
|
||||
@@ -4182,7 +4187,7 @@
|
||||
* // => '<b><script></b>'
|
||||
*
|
||||
* // using the "evaluate" delimiter to generate HTML
|
||||
* var list = '<% _.forEach(people, function(name) { %><li><%= name %></li><% }); %>';
|
||||
* var list = '<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>';
|
||||
* _.template(list, { 'people': ['moe', 'larry'] });
|
||||
* // => '<li>moe</li><li>larry</li>'
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user