Minimalistic npm packages.
Aug 16, 2018
- RubyGems - 145,675 (25 new packages/day)
- PyPI - 149,111 (104 new packages/day)
- Packagist - 191,577 (103 new packages/day)
- Maven Central - 244,143 (149 new packages/day)
- npm - 679,009 (508 new packages/day)
Minimalism doesn’t only apply to design, lifestyle and ownership, but also to code. Here are some of the most minimal packages in npm:
Returns false if the value of a property is either strictly false, or it’s inverse is strictly true.
5 weekly downloads
Let’s take a look at its github repository:
Pretty standard set of files. You’ve got your test cases, test runner config, editor config, lint config, and other necessary files. Let’s look at the code:
Return true if the given number is even.
27,881 weekly downloads
This was slightly more minimalistic.
check if a number is a positive integer
173 weekly downloads
Oh, the beauty!*
- is-array (18,412 weekly downloads)
- is-string (785,069 weekly downloads)
- is-object (1,177,287 weekly downloads)
- array-length (11 weekly downloads)
- is-empty-array (20 weekly downloads)
- is-non-empty-array (3 weekly downloads)
* The author has updated the code to a very non-minimalistic monstrosity. But for the sake of this post, we are gonna pretend that the initial commit is where it’s at.