ArrayUtil v0.0.1
Adds some utility functions to Arrays
Installation
Using NPM:
npm i -g npmnpm i array-utility
Using Yarn:
npm i yarn -gyarn add array-utility
Examples
Chunk up an Array
; // Require Array-Utilityconst array = 'This' 'is' 'an' 'awesome' 'array'; // The array to chunk console; // => [ [ 'This', 'is' ], [ 'an', 'awesome' ], [ 'array' ] ]
Find closest match in an Array
; // Require Array-Utilityconst array = 'This' 'is' 'an' 'awesome' 'array'; // The array to check console; // => This
Listing an Array
; // Require Array-Utilityconst array = 'This' 'is' 'an' 'awesome' 'array'; // The array to list console; // => This, is, an, awesome and array
Trimming an Array
; // Require Array-Utilityconst array = 'This' 'is' 'an' 'awesome' 'array'; // The array to trim console; // => [ 'This', 'is', '3 more...' ]
If you need any support, feel free to join https://discord.gg/SV7DAE9 You can support the creator at https://patreon.com/wessel