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/libnpmhook
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/libnpmhook')
-rw-r--r--workspaces/libnpmhook/lib/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/workspaces/libnpmhook/lib/index.js b/workspaces/libnpmhook/lib/index.js
index 7cd18261d..091cdc49a 100644
--- a/workspaces/libnpmhook/lib/index.js
+++ b/workspaces/libnpmhook/lib/index.js
@@ -13,7 +13,7 @@ cmd.add = (name, endpoint, secret, opts = {}) => {
}
if (name[0] === '~') {
type = 'owner'
- name = name.substr(1)
+ name = name.slice(1)
}
return fetch.json('/-/npm/v1/hooks/hook', {
...opts,