deno.land / x / rambda@v9.1.1 / src / _internals / baseSlice.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export default function baseSlice( array, start, end){ let index = -1 let { length } = array
end = end > length ? length : end if (end < 0){ end += length } length = start > end ? 0 : end - start >>> 0 start >>>= 0
const result = Array(length)
while (++index < length){ result[ index ] = array[ index + start ] }
return result}
rambda

Version Info

Tagged at
7 months ago