mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Remove semicolons.
This commit is contained in:
22
slice.js
22
slice.js
@@ -1,6 +1,6 @@
|
||||
import baseSlice from './.internal/baseSlice.js';
|
||||
import isIterateeCall from './.internal/isIterateeCall.js';
|
||||
import toInteger from './toInteger.js';
|
||||
import baseSlice from './.internal/baseSlice.js'
|
||||
import isIterateeCall from './.internal/isIterateeCall.js'
|
||||
import toInteger from './toInteger.js'
|
||||
|
||||
/**
|
||||
* Creates a slice of `array` from `start` up to, but not including, `end`.
|
||||
@@ -17,19 +17,19 @@ import toInteger from './toInteger.js';
|
||||
* @returns {Array} Returns the slice of `array`.
|
||||
*/
|
||||
function slice(array, start, end) {
|
||||
const length = array == null ? 0 : array.length;
|
||||
const length = array == null ? 0 : array.length
|
||||
if (!length) {
|
||||
return [];
|
||||
return []
|
||||
}
|
||||
if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
|
||||
start = 0;
|
||||
end = length;
|
||||
start = 0
|
||||
end = length
|
||||
}
|
||||
else {
|
||||
start = start == null ? 0 : toInteger(start);
|
||||
end = end === undefined ? length : toInteger(end);
|
||||
start = start == null ? 0 : toInteger(start)
|
||||
end = end === undefined ? length : toInteger(end)
|
||||
}
|
||||
return baseSlice(array, start, end);
|
||||
return baseSlice(array, start, end)
|
||||
}
|
||||
|
||||
export default slice;
|
||||
export default slice
|
||||
|
||||
Reference in New Issue
Block a user