mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-29 20:02:42 +01:00
Fix:Include Watcher as lib with no dependencies and fix tiny-readdir bug #610
This commit is contained in:
1 parent
160dac109d
commit
ec6e70725c
34 files changed
+2187
-281
No files matched your search
@@ -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 });
|
||||
Reference in new issue
Block a user