Commit e27db1ccc7aad65596f14513efb0e9de9ad37b34
use subarray instead of slice
Signed-off-by: wanderer <mjbecze@gmail.com>wanderer committed on 9/27/2017, 10:59:28 PM
Parent: e2492b833ea56ac03262f19efeb131600d8d872d
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -53,9 +53,9 @@ | ||
53 | 53 … | let extensionIndex = 0 |
54 | 54 … | const extension = getExtension(root) |
55 | 55 … | const extensionLen = extension.length |
56 | 56 … | let subKey |
57 | - subKey = key.slice(index, index + extensionLen) | |
57 … | + subKey = key.subarray(index, index + extensionLen) | |
58 | 58 … | |
59 | 59 … | // checks the extension against the key |
60 | 60 … | while (extensionIndex < extensionLen && extension[extensionIndex] === subKey[extensionIndex]) { |
61 | 61 … | extensionIndex++ |
Built with git-ssb-web