Retrieves all indexes, in non-overlapping ranges, of a substring in a string.
npm install --save string-indexes
import getIndexes from 'string-indexes';
getIndexes ( 'xxxx__xxxx__xxxxx', 'xx' ); // => [0, 2, 6, 8, 12, 14]
MIT © Fabio Spampinato
Retrieves all indexes, in non-overlapping ranges, of a substring in a string.
JavaScriptMIT