Commit b25e6abc authored by Daniel Bevenius's avatar Daniel Bevenius
Browse files

crypto: extract throwInvalidArgType function

This commit extracts the throwing of ERR_INVALID_ARG_TYPE which is done
in identical ways in a few places in cipher.js.

The motivation for this is that I think it improves readability enough to
warrant a commit even though I'm aware that we should avoid commits with
only these sort of refactoring.

PR-URL: https://github.com/nodejs/node/pull/22947


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarSakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
parent 7aeda947
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment