yn
npmv5.1.0TypeScriptParse yes/no like values
Adopt with care
yn is usable, with caveats. Last published 383 days ago.
- AAdoption: grade A, Excellent.
30.3M downloads per week and 1 known dependents.
- CMaintenance: grade C, Fair — worth a look.
Last published 383 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 6.0 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding yn to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node ^12.20.0 || ^14.13.1 || >=16.0.0
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the yn README.
import yn from 'yn';
yn('y');
//=> true
yn('NO');
//=> false
yn(true);
//=> true
yn('abomasum');
//=> undefined
yn vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| ynthis page | 30.3M | 1 | MIT | 1 year ago |
| meow | 36.7M | 1 | MIT | 18 hours ago |
| moment | 31.5M | 2 | MIT | 1 day ago |
| getopts | 4.2M | 1 | MIT | 16 hours ago |
| har-validatordeprecated | 0 | 1 | MIT | 18 hours ago |
| ip-address | 0 | 3 | MIT | 14 hours ago |
Dependencies
Declared by yn v5.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on yn.
Relationship graph
Dependencies (left) and dependents (right) of yn.
Frequently installed together
TypeScript definitions for node
wasm module for swc
ECMAScript parser
React is a JavaScript library for building user interfaces.
Lodash modular utilities.
A JavaScript text diff implementation.
Promise based HTTP client for the browser and node.js
ECMAScript (ESTree) AST walker
A base TSConfig for working with Node 10.
A base TSConfig for working with Node 12.
A base TSConfig for working with Node 14.
A base TSConfig for working with Node 16.
Release history
1 release in the last two years, typically about 340 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.1.0latest | 1 year ago | 6.0 KB | MIT |
| 5.0.0 | 5 years ago | 5.9 KB | MIT |
| 4.0.0 | 6 years ago | 5.8 KB | MIT |
| 3.1.1 | 7 years ago | 6.2 KB | MIT |
| 3.1.0 | 7 years ago | 6.2 KB | MIT |
| 3.0.0 | 7 years ago | 5.5 KB | MIT |
| 2.0.0 | 9 years ago | — | MIT |
| 1.3.0 | 9 years ago | — | MIT |
| 1.2.0 | 11 years ago | — | MIT |
| 1.1.0 | 12 years ago | — | MIT |
| 1.0.0 | 12 years ago | — | MIT |
Overview
yn is an npm package that parse yes/no like values. It is extremely widely used, with about 30.3M downloads per week and 1 known dependents in the graph. The latest version is 5.1.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need parse yes/no like values and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (30.3M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use yn?
yn is usable, with caveats. Last published 383 days ago.
How do I install yn?
Run `npm install yn` to add yn to your npm project.
What license is yn released under?
yn is distributed under the MIT license.
How popular is yn?
yn has approximately 30,308,894 downloads per week and 1 known dependent packages.
Is yn still maintained?
The most recent release of yn (v5.1.0) was published 1 year ago.
Does yn run install scripts?
No. yn does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.