Npm command doesn't support quoted arguments

I saw that there was a wrapper around npm

$ type npm
npm is hashed (/opt/nvm/versions/node/v10/bin/npm)

$ cat /opt/nvm/versions/node/v10/bin/npm
#!/usr/bin/env bash
set -e

err() { echo "$@" 1>&2; }

args=$@
while [[ "$1" =~ ^- ]]; do
  shift
done

npm-real $args

what’s this from? it looks all weird. there’s an unused err function. it looks through the positional parameters but backs it up in $args and then never does anything with the filtered $@. and then it calls the real npm with kind-of-the-original args, but with quoting broken

e.g. to un-deprecate a package, you’re supposed to do this

npm deprecate examplepackage ''

but you can’t do it through this wrapper