Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

22
drop.js
View File

@@ -1,5 +1,5 @@
import baseSlice from './.internal/baseSlice.js';
import toInteger from './toInteger.js';
import baseSlice from './.internal/baseSlice.js'
import toInteger from './toInteger.js'
/**
* Creates a slice of `array` with `n` elements dropped from the beginning.
@@ -12,25 +12,25 @@ import toInteger from './toInteger.js';
* @returns {Array} Returns the slice of `array`.
* @example
*
* drop([1, 2, 3]);
* drop([1, 2, 3])
* // => [2, 3]
*
* drop([1, 2, 3], 2);
* drop([1, 2, 3], 2)
* // => [3]
*
* drop([1, 2, 3], 5);
* drop([1, 2, 3], 5)
* // => []
*
* drop([1, 2, 3], 0);
* drop([1, 2, 3], 0)
* // => [1, 2, 3]
*/
function drop(array, n, guard) {
const length = array == null ? 0 : array.length;
const length = array == null ? 0 : array.length
if (!length) {
return [];
return []
}
n = (guard || n === undefined) ? 1 : toInteger(n);
return baseSlice(array, n < 0 ? 0 : n, length);
n = (guard || n === undefined) ? 1 : toInteger(n)
return baseSlice(array, n < 0 ? 0 : n, length)
}
export default drop;
export default drop