mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Cleanup support for a step of 0 in _.range and add unit tests.
Former-commit-id: 383719999d8f4a7e153784aea3b6f4174684dd9a
This commit is contained in:
6
build.js
6
build.js
@@ -3821,6 +3821,12 @@
|
||||
.replace(/(\n *)}/, ",$1 '/': '/'$1}");
|
||||
});
|
||||
}
|
||||
// remove support for a `step` of `0` in `_.range`
|
||||
if (!isLodash('range')) {
|
||||
source = source.replace(matchFunction(source, 'range'), function(match) {
|
||||
return match.replace(/typeof *step[^:]+:/, '+step ||');
|
||||
});
|
||||
}
|
||||
|
||||
// replace `slice` with `nativeSlice.call`
|
||||
_.each(['clone', 'first', 'initial', 'last', 'rest', 'toArray'], function(funcName) {
|
||||
|
||||
Reference in New Issue
Block a user