We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ow
We have two places we use ow - checking if an argument is a string:
np/source/npm/util.js
Lines 49 to 51 in 5d4645f
or checking if an argument has a specific key:
np/source/util.js
Lines 64 to 65 in 5d4645f
Seems like we could just have a utility assert / invariant function:
assert
invariant
const assert = (condition, message) => { if (!condition) { throw new Error(message); } }; // … assert(Object.hasOwn(config, 'cli'), 'config must have a cli property');
The text was updated successfully, but these errors were encountered:
👍
Sorry, something went wrong.
Related, do we need these checks at all? Especially the packageName one - seems like that could be done at the very beginning of the CLI.
packageName
Successfully merging a pull request may close this issue.
We have two places we use
ow
- checking if an argument is a string:np/source/npm/util.js
Lines 49 to 51 in 5d4645f
or checking if an argument has a specific key:
np/source/util.js
Lines 64 to 65 in 5d4645f
Seems like we could just have a utility
assert
/invariant
function:The text was updated successfully, but these errors were encountered: