Notice: This is a ES package, development requires a Node >=v13.2
- You must use reduce in your solution, (ie no map/filter/foreach)
- Your solution must be functional (ie no side-effects)
- Recursion is be allowed for nested data types
- Be mindful of performance/memory
- VanillaJS only
This package is designed to make contributing as easy as possible. All work is tracked in the Issues.
If you'd like to contribute claim an existing issue -or- create a new issue. All unassigned issues are up-for-grabs.
Development follows the Feature Branch Workflow:
- Fork the repo
- Clone your fork
- Create a
feat/[name]
branch - Implement your feature
- Commit the changes
- Add tests (verify w/
npm run test
) - Check styling (verify w/
npm run lint
) - Add JSDoc comments and type check them (verify w/
npm run types
) - Create a PR to merge the feature branch
- Reference the issue in the PR
Note: If linting (7) and/or adding typed JSDoc comments (8) feel daunting, don't hesitate to submit a PR without them.
The easiest path to implement new operators is via TDD (Test Driven Development).
- Create a class for the operator (
[operator].js
) - Create a test for the operator (
[operator].spec.js
) - Write a test proof and implement it in the class
- Run the test
There are 3 different ways to run tests
- Open the
.spec
file in VSCode - Open the 'Debug' pane
- Run the 'Test' configuration
The watcher looks for changes in the .spec
files. When a change is detected, the tests in that file are run.
- Open a terminal an the project directory
- Run
npm run test:watch
- Modify then save a
.spec
file
All .spec
files can be run directly from the CLI
- Open a terminal
- Run
node [path]