Fix:Include Watcher as lib with no dependencies and fix tiny-readdir bug #610

This commit is contained in:
advplyr 2022-05-28 20:01:20 -05:00
parent 160dac109d
commit ec6e70725c
34 changed files with 2187 additions and 281 deletions

View file

@ -0,0 +1,17 @@
"use strict";
/* STRING INDEXES */
function indexes(str, substr) {
var indexes = [], rangeLength = substr.length;
var indexFrom = 0;
while (true) {
var index = str.indexOf(substr, indexFrom);
if (index === -1)
return indexes;
indexes.push(index);
indexFrom = index + rangeLength;
}
}
/* EXPORT */
module.exports = indexes;
module.exports.default = indexes;
Object.defineProperty(module.exports, "__esModule", { value: true });