JSPM

  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q52974F
  • License MIT

Modern JavaScript inspired by the spreadsheet library

Package Exports

  • functionfoundry

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (functionfoundry) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

functionfoundry

Circle CI

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.

quickstart

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')
  )
)

naming conventions

All function names are lowercase by default. Select functions include camelCase aliases.

organization

name purpose
docs Annotated source code generated by docco
src Original source code written in modern JavaScript (JS2015)
test Test code written for tape