Gathering detailed insights and metrics for vanillas
Gathering detailed insights and metrics for vanillas
Gathering detailed insights and metrics for vanillas
Gathering detailed insights and metrics for vanillas
npm install vanillas
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
11 Stars
167 Commits
1 Forks
2 Watching
5 Branches
1 Contributors
Updated on 23 Jul 2023
Minified
Minified + Gzipped
JavaScript (99.84%)
TypeScript (0.16%)
Cumulative downloads
Total Downloads
Last day
-32.4%
46
Compared to previous day
Last week
-16.5%
248
Compared to previous week
Last month
3.6%
1,505
Compared to previous month
Last year
-23.6%
16,866
Compared to previous year
No dependencies detected.
JavaScript utility functions. Comparable to Lodash or Ramda, but faster. In some cases it even outperforms native implementations (or leverages native implementations that are messy to type out).
Lodash/Underscore created an API many years ago which is unfavorable to Currying. For currying to be possible you need the final argument to your function to be the data on which you operate (rather than the first arg). And although Lodash/Underscore has an "fp" (functional programming) subset, the fundamental flaw in the argument order can't be corrected.
A similar utils library Ramda was created as a classic functional programming library, and the most notable change was to reorder the arguments to be favorable to currying. Ramda took it a step further than than (perhaps too far) of making every function in the whole library curried. This isn't always desired. But the more critical flaw with Ramda is it is slow. Very slow.
Vanillas was created to correct those perceived flaws in both Lodash/Underscore and Ramda. It outperforms those libraries, makes currying possible, yet allows you to opt-in to currying.
View the full docs. These are generated from - and always in-sync with - the JsDoc code annotations.
Importing from the root vanillas
namespace yields all the non-curried utility functions (including the curry()
function itself if you want to do your own). To use the curried versions of the Vanillas utility functions though, just import from the vanillas/curried
directory rather than from the root.
npm install vanillas
Run any of the files in the benchmark/test/
directory.
Examples (run one or more benchmark tests, space-delimited):
npm run benchmark compose
npm run benchmark propAt
npm run benchmark mapObject
npm run benchmark compose mapObject propAt
Or you can run all of them (grab a cup of coffee while you wait):
npm run benchmark
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/20 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More