Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 2, 2023
1 parent 24d5e9c commit 76aa877
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 26 deletions.
11 changes: 6 additions & 5 deletions package.json
Expand Up @@ -55,21 +55,22 @@
"read-pkg-up": "^9.1.0",
"redent": "^4.0.0",
"trim-newlines": "^5.0.0",
"type-fest": "^3.7.1",
"type-fest": "^3.9.0",
"yargs-parser": "^21.1.1"
},
"devDependencies": {
"ava": "^5.2.0",
"common-tags": "^1.8.2",
"execa": "^7.1.1",
"indent-string": "^5.0.0",
"read-pkg": "^7.1.0",
"tsd": "^0.28.0",
"xo": "^0.53.1"
"read-pkg": "^8.0.0",
"tsd": "^0.28.1",
"xo": "^0.54.2"
},
"xo": {
"rules": {
"unicorn/no-process-exit": "off"
"unicorn/no-process-exit": "off",
"unicorn/error-message": "off"
}
},
"ava": {
Expand Down
22 changes: 4 additions & 18 deletions readme.md
Expand Up @@ -18,14 +18,14 @@

## Install

```
$ npm install meow
```sh
npm install meow
```

## Usage

```
$ ./foo-app.js unicorns --rainbow
```sh
./foo-app.js unicorns --rainbow
```

```js
Expand Down Expand Up @@ -310,18 +310,4 @@ See [`get-stdin`](https://github.com/sindresorhus/get-stdin) if you want to acce

See [`conf`](https://github.com/sindresorhus/conf) if you need to persist some data.

See [`update-notifier`](https://github.com/yeoman/update-notifier) if you want update notifications.

[More useful CLI utilities…](https://github.com/sindresorhus/awesome-nodejs#command-line-utilities)

---

<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-meow?utm_source=npm-meow&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
2 changes: 1 addition & 1 deletion source/parser.js
Expand Up @@ -14,7 +14,7 @@ const buildParserFlags = ({flags, booleanDefault}) => {
}

if (
typeof booleanDefault !== 'undefined'
booleanDefault !== undefined
&& flag.type === 'boolean'
&& !Object.hasOwn(flag, 'default')
) {
Expand Down
4 changes: 2 additions & 2 deletions source/validate.js
Expand Up @@ -87,7 +87,7 @@ const isFlagMissing = (flagName, definedFlags, receivedFlags, input) => {
}
}

if (typeof receivedFlags[flagName] === 'undefined') {
if (receivedFlags[flagName] === undefined) {
return isFlagRequired;
}

Expand All @@ -103,7 +103,7 @@ const reportMissingRequiredFlags = missingRequiredFlags => {

export const checkMissingRequiredFlags = (flags, receivedFlags, input) => {
const missingRequiredFlags = [];
if (typeof flags === 'undefined') {
if (flags === undefined) {
return [];
}

Expand Down

0 comments on commit 76aa877

Please sign in to comment.