zeelib
A small lib of FP, Node, and DOM utils.
Usage
import z from 'zeelib'
z.open('http://zacanger.com')
if (z.isEven(process.argv[2])) // do things
z.camelCaseToLispCase('thisString')
You can also import individual functions.
import c from 'zeelib/dist/colorize'
console.log(c.bold(c.blue('HELLO THERE')))
If you're using require
with individual files you'll need to use default
:
const c = require('zeelib/dist/colorize').default
If you get errors when using zeelib
in a front-end build, you may need to use
something like Webpack's node
option. Try:
node: {
fs: 'empty',
net: 'empty',
tls: 'empty',
readline: 'empty',
child_process: 'empty'
}
Or, just import the functions you need (like
import words from 'zeelib/dist/words'
).
License
Contributing
- This project uses Flow.
- Please run
npm test
. - If you can, please add a test.
- Please add your thing in
src/index.js
in the appropriate place - Make sure you run
npm run build
- (This also runs
test
, which also runsflow
andeslint
)
- (This also runs