</>PackageGraphPackageGraph

yn

npmv5.1.0TypeScript

Parse 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

6.0 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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
Example truncated — see the full README.

yn vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
ynthis page30.3M1MIT1 year ago
meow36.7M1MIT18 hours ago
moment31.5M2MIT1 day ago
getopts4.2M1MIT16 hours ago
har-validatordeprecated01MIT18 hours ago
ip-address03MIT14 hours ago

Dependencies

Declared by yn v5.1.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (3)

ava ^3.15.0tsd ^0.17.0xo ^0.44.0

Used by

Popular packages that depend on yn.

Relationship graph

Dependencies (left) and dependents (right) of yn.

ts-nodeyn
yn dependencies dependents

Frequently installed together

Release history

1 release in the last two years, typically about 340 days apart.

Recent versions of yn
VersionPublishedSizeLicense
5.1.0latest1 year ago6.0 KBMIT
5.0.05 years ago5.9 KBMIT
4.0.06 years ago5.8 KBMIT
3.1.17 years ago6.2 KBMIT
3.1.07 years ago6.2 KBMIT
3.0.07 years ago5.5 KBMIT
2.0.09 years agoMIT
1.3.09 years agoMIT
1.2.011 years agoMIT
1.1.012 years agoMIT
1.0.012 years agoMIT

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

Keywords

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.