mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
Make stub functions hoistable.
This commit is contained in:
12
lodash.js
12
lodash.js
@@ -15306,7 +15306,9 @@
|
||||
* _.times(2, _.stubFalse);
|
||||
* // => [false, false]
|
||||
*/
|
||||
var stubFalse = constant(false);
|
||||
function stubFalse() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* A method that returns a new empty object.
|
||||
@@ -15343,7 +15345,9 @@
|
||||
* _.times(2, _.stubString);
|
||||
* // => ['', '']
|
||||
*/
|
||||
var stubString = constant('');
|
||||
function stubString() {
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* A method that returns `true`.
|
||||
@@ -15358,7 +15362,9 @@
|
||||
* _.times(2, _.stubTrue);
|
||||
* // => [true, true]
|
||||
*/
|
||||
var stubTrue = constant(true);
|
||||
function stubTrue() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes the iteratee `n` times, returning an array of the results of
|
||||
|
||||
Reference in New Issue
Block a user