inverse-slice
A small library for inverse slice and splice methods/functions for strings and arrays in node.js
Install
npm install inverse-slice
Example
Inverse slice (iSlice)
;let arr1 = 1234567;let start = 0;let end = 1;let arr2 = arr1; // Inverse slice from start to end, will not modify arr1console;// -> [2,3,4,5,6,7]console// -> [1,2,3,4,5,6,7] not modified
Api
Just use:
;
Slice
Will work with arrays and strings:
Array;String;