Remove baseSlice.

This commit is contained in:
John-David Dalton
2017-04-17 21:03:39 -07:00
parent a023f92049
commit e5e8f35c06
11 changed files with 37 additions and 54 deletions

View File

@@ -1,4 +1,4 @@
import baseSlice from './baseSlice.js'
import slice from '../slice.js'
/**
* Casts `array` to a slice if it's needed.
@@ -12,7 +12,7 @@ import baseSlice from './baseSlice.js'
function castSlice(array, start, end) {
const { length } = array
end = end === undefined ? length : end
return (!start && end >= length) ? array : baseSlice(array, start, end)
return (!start && end >= length) ? array : slice(array, start, end)
}
export default castSlice