We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
array
Array
Length
Number
Splits an array into multiple array specified with the size argument If array can't be split evenly, the final chunk will be the remaining elements
size
nabbit.chunk([ 'a', 'b', 'c', 'd' ], 2) // => [[ 'a', 'b' ], [ 'c', 'd' ]] nabbit.chunk([ 'a', 'b', 'c', 'd' ], 3) // => [[ 'a', 'b', 'c' ], [ 'd' ]]
splitter
String
conj
Join an array together with a custom splitter and a conjoin at the end
conjoin
nabbit.list( [ 1, 2, 3 ], ', ', 'and' ) // => 1, 2 and 3
Rerearrange every entry in array to a random position
nabbit.scramble([ 1, 2, 3 ]) // => [ 3, 1, 2 ] nabbit.scramble( 'Hello'.split( '' ) ).join( '' ) // => elHlo