Skip to content
New issue

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

Update readme to explain why npm-name vs npm search #4

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,27 @@ $ npm-name --help
```


## Why?

You might rightly ask, "Why would I use npm-name rather than npm's built-in search?".
There are two big reasons

1) [npm search is only supported on npm 4](https://github.com/npm/npm/issues/14649#issuecomment-262820415)
, which is not yet bundled with node.

2) Performance

Using npm 4.0.2

```
$ time npm search unicorn-cake
No matches found for "unicorn-cake"
npm search unicorn-cake 55.50s user 0.82s system 101% cpu 55.380 total
$ time npm-name unicorn-cake
✔ unicorn-cake is available
npm-name unicorn-cake 0.17s user 0.02s system 35% cpu 0.535 total
```

## Related

- [npm-name](https://github.com/sindresorhus/npm-name) - API for this module
Expand Down