Skip to content

Commit e2d55e7

Browse files
fix: replace deprecated String.prototype.substr() (#445)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
1 parent c837758 commit e2d55e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const find = (folder, set = [], root = true) => {
2525
if (!root) {
2626
return
2727
}
28-
return set.map(f => f.substr(folder.length + 1)
28+
return set.map(f => f.slice(folder.length + 1)
2929
.replace(/\\/g, '/'))
3030
.sort((a, b) => a.localeCompare(b))
3131
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy