A small collection of utility functions to help with functional programming in JavaScript.
These methods are meant to compliment the vast suite of methods already available in libraries like lodash/fp. In fact, this library itself uses some of the lodash/fp methods. This is a work in progress and more methods will be added in the future.
You can read the API docs here.
Install Node >= 6.x
and npm >= 3.x
.
- Clone the repository.
npm i
ornpm yarn install
npm start
Task name | Purpose |
---|---|
test |
Run the unit tests using testem and tape. |
clean |
Remove the build directory. |
lint |
Runs the linter using eslint. |
start |
Start the application using webpack and webpack dev server. The behavior changes based on the NODE_ENV env var. |
doc |
Builds the documentation and serves it up on localhost:4001 . |
Tests are using the following tools:
- mocha JavaScript test framework for node and browsers
- testem test runner
- testdouble test double library for TDD with JavaScript
- webpack HMR hot module replacement using webpack
You can run tests with the following steps:
- Run
npm start
to start the webpack live watch mode for HMR. - Run
npm t
to build the test bundle and to run the tests. - View test results in the terminal window and/or open
http://localhost:7357/
in a web browser to see the results of the tests.
Changing either source files or test files will immediately result in an incremental build (HMR) and re-run of all of the tests.
API docs for this library's methods written using jsdoc and are built using documentation.js
A more detailed list of documentation-related scripts are as follows:
Task name | Purpose |
---|---|
doc:html |
Build the html version of the docs and output to the 'doc' directory |
doc:md |
Build the markdown version of the docs and output to the doc.md file |
doc:serve |
Serve the docs so that they are viewable at localhost:4001 . |
doc |
Builds the documentation and serves it up on localhost:4001 . |