diff options
author | CommanderRoot <CommanderRoot@users.noreply.github.com> | 2022-04-04 21:08:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-04 21:08:43 +0300 |
commit | e3da5df4152fbe547f7871547165328e1bf06262 (patch) | |
tree | 273fd46ffb39ca4499af4a5b6a8807ba2b32b382 /workspaces/libnpmdiff | |
parent | 44108f7be5e1e928d8aa3eda3c5c177bcd216c99 (diff) |
fix: replace deprecated String.prototype.substr() (#4667)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Diffstat (limited to 'workspaces/libnpmdiff')
-rw-r--r-- | workspaces/libnpmdiff/lib/should-print-patch.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/workspaces/libnpmdiff/lib/should-print-patch.js b/workspaces/libnpmdiff/lib/should-print-patch.js index a95481140..f8277a809 100644 --- a/workspaces/libnpmdiff/lib/should-print-patch.js +++ b/workspaces/libnpmdiff/lib/should-print-patch.js @@ -14,7 +14,7 @@ const shouldPrintPatch = (path, opts = {}) => { filename.startsWith('.') ? filename : extname(filename) - ).substr(1) + ).slice(1) return !binaryExtensions.includes(extension) } |