8000 Update vendors, builds, and docs. · lodash/lodash@bc79d09 · GitHub
[go: up one dir, main page]

Skip to content

Commit bc79d09

Browse files
committed
Update vendors, builds, and docs.
1 parent 5b2becb commit bc79d09

File tree

7 files changed

+319
-286
lines changed

7 files changed

+319
-286
lines changed

dist/lodash.compat.js

Lines changed: 26 additions & 21 deletions
* arguments; (value, index, array).
Original file line numberDiff line numberDiff line change
@@ -2756,7 +2756,7 @@
27562756
* Creates a shallow clone of `object` excluding the specified properties.
27572757
* Property names may be specified as individual arguments or as arrays of
27582758
* property names. If a callback is provided it will be executed for each
2759-
* property of `object` omitting the properties the callback returns truthy
2759+
* property of `object` omitting the properties the callback returns truey
27602760
* for. The callback is bound to `thisArg` and invoked with three arguments;
27612761
* (value, key, object).
27622762
*
@@ -2830,7 +2830,7 @@
28302830
* Creates a shallow clone of `object` composed of the specified properties.
28312831
* Property names may be specified as individual arguments or as arrays of
28322832
* property names. If a callback is provided it will be executed for each
2833-
* property of `object` picking the properties the callback returns truthy
2833+
* property of `object` picking the properties the callback returns truey
28342834
* for. The callback is bound to `thisArg` and invoked with three arguments;
28352835
* (value, key, object).
28362836
*
@@ -3079,7 +3079,7 @@
30793079
});
30803080

30813081
/**
3082-
* Checks if the given callback returns truthy value for **all** elements of
3082+
* Checks if the given callback returns truey value for **all** elements of
30833083
* a collection. The callback is bound to `thisArg` and invoked with three
30843084
* arguments; (value, index|key, collection).
30853085
*
@@ -3142,7 +3142,7 @@
31423142

31433143
/**
31443144
* Iterates over elements of a collection, returning an array of all elements
3145-
* the callback returns truthy for. The callback is bound to `thisArg` and
3145+
* the callback returns truey for. The callback is bound to `thisArg` and
31463146
* invoked with three arguments; (value, index|key, collection).
31473147
*
31483148
* If a property name is provided for `callback` the created "_.pluck" style
@@ -3206,7 +3206,7 @@
32063206

32073207
/**
32083208
* Iterates over elements of a collection, returning the first element that
3209-
* the callback returns truthy for. The callback is bound to `thisArg` and
3209+
* the callback returns truey for. The callback is bound to `thisArg` and
32103210
* invoked with three arguments; (value, index|key, collection).
32113211
*
32123212
* If a property name is provided for `callback` the created "_.pluck" style
@@ -3805,7 +3805,7 @@
38053805

38063806
/**
38073807
* The opposite of `_.filter` this method returns the elements of a
3808-
* collection that the callback does **not** return truthy for.
3808+
* collection that the callback does **not** return truey for.
38093809
*
38103810
* If a property name is provided for `callback` the created "_.pluck" style
38113811
* callback will return the property value of the given element.
@@ -3932,7 +3932,7 @@
39323932
}
39333933

39343934
/**
3935-
* Checks if the callback returns a truthy value for **any** element of a
3935+
* Checks if the callback returns a truey value for **any** element of a
39363936
* collection. The function returns as soon as it finds a passing value and
39373937
* does not iterate over the entire collection. The callback is bound to
39383938
* `thisArg` and invoked with three arguments; (value, index|key, collection).
@@ -4243,7 +4243,7 @@
42434243
/**
42444244
* Gets the first element or first `n` elements of an array. If a callback
42454245
* is provided elements at the beginning of the array are returned as long
4246-
* as the callback returns truthy. The callback is bound to `thisArg` and
4246+
* as the callback returns truey. The callback is bound to `thisArg` and
42474247
* invoked with three arguments; (value, index, array).
42484248
*
42494249
* If a property name is provided for `callback` the created "_.pluck" style
@@ -4319,7 +4319,7 @@
43194319

43204320
/**
43214321
* Flattens a nested array (the nesting can be to any depth). If `isShallow`
4322-
* is truthy, the array will only be flattened a single level. If a callback
4322+
* is truey, the array will only be flattened a single level. If a callback
43234323
* is provided each element of the array is passed through the callback before
43244324
* flattening. The callback is bound to `thisArg` and invoked with three
43254325
@@ -4409,7 +4409,7 @@
44094409
/**
44104410
* Gets all but the last element or last `n` elements of an array. If a
44114411
* callback is provided elements at the end of the array are excluded from
4412-
* the result as long as the callback returns truthy. The callback is bound
4412+
* the result as long as the callback returns truey. The callback is bound
44134413
* to `thisArg` and invoked with three arguments; (value, index, array).
44144414
*
44154415
* If a property name is provided for `callback` the created "_.pluck" style
@@ -4542,7 +4542,7 @@
45424542
/**
45434543
* Gets the last element or last `n` elements of an array. If a callback is
45444544
* provided elements at the end of the array are returned as long as the
4545-
* callback returns truthy. The callback is bound to `thisArg` and invoked
4545+
* callback returns truey. The callback is bound to `thisArg` and invoked
45464546
* with three arguments; (value, index, array).
45474547
*
45484548
* If a property name is provided for `callback` the created "_.pluck" style
@@ -4738,7 +4738,7 @@
47384738
}
47394739

47404740
/**
4741-
* Removes all elements from an array that the callback returns truthy for
4741+
* Removes all elements from an array that the callback returns truey for
47424742
* and returns an array of removed elements. The callback is bound to `thisArg`
47434743
* and invoked with three arguments; (value, index, array).
47444744
*
@@ -4790,7 +4790,7 @@
47904790
* The opposite of `_.initial` this method gets all but the first element or
47914791
* first `n` elements of an array. If a callback function is provided elements
47924792
* at the beginning of the array are excluded from the result as long as the
4793-
* callback returns truthy. The callback is bound to `thisArg` and invoked
4793+
* callback returns truey. The callback is bound to `thisArg` and invoked
47944794
* with three arguments; (value, index, array).
47954795
*
47964796
* If a property name is provided for `callback` the created "_.pluck" style
@@ -5083,8 +5083,8 @@
50835083
/*--------------------------------------------------------------------------*/
50845084

50855085
/**
5086-
* Creates a function this is restricted to executing `func` with the `this`
5087-
* binding and arguments of the created function, only after it is called `n` times.
5086+
* Creates a function that executes `func`, with the `this` binding and
5087+
* arguments of the created function, only after being called `n` times.
50885088
*
50895089
* @static
50905090
* @memberOf _
@@ -5095,11 +5095,16 @@
50955095
* @returns {Function} Returns the new restricted function.
50965096
* @example
50975097
*
5098-
* var renderNotes = _.after(notes.length, render);
5099-
* _.forEach(notes, function(note) {
5100-
* note.asyncSave({ 'success': renderNotes });
5098+
* var saves = ['profile', 'settings'];
5099+
*
5100+
* var done = _.after(saves.length, function() {
5101+
* console.log('Done saving!');
5102+
* });
5103+
*
5104+
* _.forEach(saves, function(type) {
5105+
* asyncSave({ 'type': type, 'complete': done });
51015106
* });
5102-
* // `renderNotes` is run once, after all notes have saved
5107+
* // => logs 'Done saving!', after all saves have completed
51035108
*/
51045109
function after(n, func) {
51055110
if (!isFunction(func)) {
@@ -6002,7 +6007,7 @@
60026007
* is given, else it returns the interpolated text.
60036008
* @example
60046009
*
6005-
* // using a compiled template
6010+
* // using the "interpolate" delimiter to create a compiled template
60066011
* var compiled = _.template('hello <%= name %>');
60076012
* compiled({ 'name': 'moe' });
60086013
* // => 'hello moe'
@@ -6012,7 +6017,7 @@
60126017
* // => '<b>&lt;script&gt;</b>'
60136018
*
60146019
* // using the "evaluate" delimiter to generate HTML
6015-
* var list = '<% _.forEach(people, function(name) { %><li><%= name %></li><% }); %>';
6020+
* var list = '<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>';
60166021
* _.template(list, { 'people': ['moe', 'larry'] });
60176022
* // => '<li>moe</li><li>larry</li>'
60186023
*

dist/lodash.js

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@
13221322
* @param {Function} func The function to set data on.
13231323
* @param {*} value The value to set.
13241324
*/
1325-
var setBindData = !defineProperty ? noop : function(func, value) {
1325+
var setBindData = function(func, value) {
13261326
var descriptor = getObject();
13271327
descriptor.value = value;
13281328
defineProperty(func, '__bindData__', descriptor);
@@ -2409,7 +2409,7 @@
24092409
* Creates a shallow clone of `object` excluding the specified properties.
24102410
* Property names may be specified as individual arguments or as arrays of
24112411
* property names. If a callback is provided it will be executed for each
2412-
* property of `object` omitting the properties the callback returns truthy
2412+
* property of `object` omitting the properties the callback returns truey
24132413
* for. The callback is bound to `thisArg` and invoked with three arguments;
24142414
* (value, key, object).
24152415
*
@@ -2483,7 +2483,7 @@
24832483
* Creates a shallow clone of `object` composed of the specified properties.
24842484
* Property names may be specified as individual arguments or as arrays of
24852485
* property names. If a callback is provided it will be executed for each
2486-
* property of `object` picking the properties the callback returns truthy
2486+
* property of `object` picking the properties the callback returns truey
24872487
* for. The callback is bound to `thisArg` and invoked with three arguments;
24882488
* (value, key, object).
24892489
*
@@ -2729,7 +2729,7 @@
27292729
});
27302730

27312731
/**
2732-
* Checks if the given callback returns truthy value for **all** elements of
2732+
* Checks if the given callback returns truey value for **all** elements of
27332733
* a collection. The callback is bound to `thisArg` and invoked with three
27342734
* arguments; (value, index|key, collection).
27352735
*
@@ -2792,7 +2792,7 @@
27922792

27932793
/**
27942794
* Iterates over elements of a collection, returning an array of all elements
2795-
* the callback returns truthy for. The callback is bound to `thisArg` and
2795+
* the callback returns truey for. The callback is bound to `thisArg` and
27962796
* invoked with three arguments; (value, index|key, collection).
27972797
*
27982798
* If a property name is provided for `callback` the created "_.pluck" style
@@ -2856,7 +2856,7 @@
28562856

28572857
/**
28582858
* Iterates over elements of a collection, returning the first element that
2859-
* the callback returns truthy for. The callback is bound to `thisArg` and
2859+
* the callback returns truey for. The callback is bound to `thisArg` and
28602860
* invoked with three arguments; (value, index|key, collection).
28612861
*
28622862
* If a property name is provided for `callback` the created "_.pluck" style
@@ -3463,7 +3463,7 @@
34633463

34643464
/**
34653465
* The opposite of `_.filter` this method returns the elements of a
3466-
* collection that the callback does **not** return truthy for.
3466+
* collection that the callback does **not** return truey for.
34673467
*
34683468
* If a property name is provided for `callback` the created "_.pluck" style
34693469
* callback will return the property value of the given element.
@@ -3590,7 +3590,7 @@
35903590
}
35913591

35923592
/**
3593-
* Checks if the callback returns a truthy value for **any** element of a
3593+
* Checks if the callback returns a truey value for **any** element of a
35943594
* collection. The function returns as soon as it finds a passing value and
35953595
* does not iterate over the entire collection. The callback is bound to
35963596
* `thisArg` and invoked with three arguments; (value, index|key, collection).
@@ -3899,7 +3899,7 @@
38993899
/**
39003900
* Gets the first element or first `n` elements of an array. If a callback
39013901
* is provided elements at the beginning of the array are returned as long
3902-
* as the callback returns truthy. The callback is bound to `thisArg` and
3902+
* as the callback returns truey. The callback is bound to `thisArg` and
39033903
* invoked with three arguments; (value, index, array).
39043904
*
39053905
* If a property name is provided for `callback` the created "_.pluck" style
@@ -3975,7 +3975,7 @@
39753975

39763976
/**
39773977
* Flattens a nested array (the nesting can be to any depth). If `isShallow`
3978-
* is truthy, the array will only be flattened a single level. If a callback
3978+
* is truey, the array will only be flattened a single level. If a callback
39793979
* is provided each element of the array is passed through the callback before
39803980
* flattening. The callback is bound to `thisArg` and invoked with three
39813981
* arguments; (value, index, array).
@@ -4065,7 +4065,7 @@
40654065
/**
40664066
* Gets all but the last element or last `n` elements of an array. If a
40674067
* callback is provided elements at the end of the array are excluded from
4068-
* the result as long as the callback returns truthy. The callback is bound
4068+
* the result as long as the callback returns truey. The callback is bound
40694069
* to `thisArg` and invoked with three arguments; (value, index, array).
40704070
*
40714071
* If a property name is provided for `callback` the created "_.pluck" style
@@ -4198,7 +4198,7 @@
41984198
/**
41994199
* Gets the last element or last `n` elements of an array. If a callback is
42004200
* provided elements at the end of the array are returned as long as the
4201-
* callback returns truthy. The callback is bound to `thisArg` and invoked
4201+
* callback returns truey. The callback is bound to `thisArg` and invoked
42024202
* with three arguments; (value, index, array).
42034203
*
42044204
* If a property name is provided for `callback` the created "_.pluck" style
@@ -4394,7 +4394,7 @@
43944394
}
43954395

43964396
/**
4397-
* Removes all elements from an array that the callback returns truthy for
4397+
* Removes all elements from an array that the callback returns truey for
43984398
* and returns an array of removed elements. The callback is bound to `thisArg`
43994399
* and invoked with three arguments; (value, index, array).
44004400
*
@@ -4446,7 +4446,7 @@
44464446
* The opposite of `_.initial` this method gets all but the first element or
44474447
* first `n` elements of an array. If a callback function is provided elements
44484448
* at the beginning of the array are excluded from the result as long as the
4449-
* callback returns truthy. The callback is bound to `thisArg` and invoked
4449+
* callback returns truey. The callback is bound to `thisArg` and invoked
44504450
* with three arguments; (value, index, array).
44514451
*
44524452
* If a property name is provided for `callback` the created "_.pluck" style
@@ -4739,8 +4739,8 @@
47394739
/*--------------------------------------------------------------------------*/
47404740

47414741
/**
4742-
* Creates a function this is restricted to executing `func` with the `this`
4743-
* binding and arguments of the created function, only after it is called `n` times.
4742+
* Creates a function that executes `func`, with the `this` binding and
4743+
* arguments of the created function, only after being called `n` times.
47444744
*
47454745
* @static
47464746
* @memberOf _
@@ -4751,11 +4751,16 @@
47514751
* @returns {Function} Returns the new restricted function.
47524752
* @example
47534753
*
4754-
* var renderNotes = _.after(notes.length, render);
4755-
* _.forEach(notes, function(note) {
4756-
* note.asyncSave({ 'success': renderNotes });
4754+
* var saves = ['profile', 'settings'];
4755+
*
4756+
* var done = _.after(saves.length, function() {
4757+
* console.log('Done saving!');
4758+
* });
4759+
*
4760+
* _.forEach(saves, function(type) {
4761+
* asyncSave({ 'type': type, 'complete': done });
47574762
* });
4758-
* // `renderNotes` is run once, after all notes have saved
4763+
* // => logs 'Done saving!', after all saves have completed
47594764
*/
47604765
function after(n, func) {
47614766
if (!isFunction(func)) {
@@ -5658,7 +5663,7 @@
56585663
* is given, else it returns the interpolated text.
56595664
* @example
56605665
*
5661-
* // using a compiled template
5666+
* // using the "interpolate" delimiter to create a compiled template
56625667
* var compiled = _.template('hello <%= name %>');
56635668
* compiled({ 'name': 'moe' });
56645669
* // => 'hello moe'
@@ -5668,7 +5673,7 @@
56685673
* // => '<b>&lt;script&gt;</b>'
56695674
*
56705675
* // using the "evaluate" delimiter to generate HTML
5671-
* var list = '<% _.forEach(people, function(name) { %><li><%= name %></li><% }); %>';
5676+
* var list = '<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>';
56725677
* _.template(list, { 'people': ['moe', 'larry'] });
56735678
* // => '<li>moe</li><li>larry</li>'
56745679
*

0 commit comments

Comments
 (0)
0