array-segments
Finds element segments matches in an array.
Usage
const array_segments = ; let res res = array_segments console// [ { segment: [ 'c', 'd', 'e' ], indices: [ 2 ] },// { segment: [ 'a', 'z' ], indices: [ 6 ] },// { segment: [ 'a', 'b' ], indices: [ 0, 8 ] } ] // Case insensitive matchres = array_segments console// [ { segment: [ 'c', 'd', 'e' ], indices: [ 2 ] },// { segment: [ 'a', 'z' ], indices: [ 6 ] },// { segment: [ 'a', 'b' ], indices: [ 0, 8 ] } ]
Contributions
Pull Requests and contributions in general are welcome as long as they follow the Node aesthetic.