
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
functionfoundry
Advanced tools
FunctionFoundry is a JavaScript library with an interface similar to the classic spreadsheet functions.
The code runs in Node.js and browsers. The library provides ~100 functions but it is small (~30kb minified).
For more information see the docs or read the annotated code.
npm install --save functionfoundry
var { and, eq, len, gt, lt, isnumber, isText, isEmail, isEmpty, lower, proper, text, date} = require('functionfoundry')
// print `true`
console.log(
and(
isnumber(1),
isText('this is'),
isEmail('me@gmail.com'),
isEmpty(''),
gt(2, 1),
lt(1, 2),
eq(len('foo'), 3),
eq(lower('HAPPY'), 'happy'),
eq(proper('happy'), 'Happy'),
eq(text(4200.00, "$#,###.00"), '$4,200.00'),
eq(text(date(2000, 2, 1), "m-d-yyyy"), '2-1-2000')
)
)
All function names are lowercase by default. Select functions include camelCase aliases.
name | purpose |
---|---|
docs | Annotated source code generated by docco |
src | Original source code written in modern JavaScript (JS2015) |
test | Test code written for tape |
FAQs
Pure function JavaScript library
We found that functionfoundry demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.