Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCommanderRoot <CommanderRoot@users.noreply.github.com>2022-04-04 21:08:43 +0300
committerGitHub <noreply@github.com>2022-04-04 21:08:43 +0300
commite3da5df4152fbe547f7871547165328e1bf06262 (patch)
tree273fd46ffb39ca4499af4a5b6a8807ba2b32b382 /workspaces/libnpmdiff
parent44108f7be5e1e928d8aa3eda3c5c177bcd216c99 (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.js2
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)
}