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/libnpmhook | |
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/libnpmhook')
-rw-r--r-- | workspaces/libnpmhook/lib/index.js | 2 |
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, |