You can either install via npm
$ npm install onionskin
Or via bower
$ bower install onionskin
Or you can just grab a copy of it here
// Library is exposed on the browser with browserify for API consistency with node.jsvar OnionSkin = ;// Initialize a poolvar pool = ;pool;
Want to help?
So you decided you want to help... This is awesome!!! Follow this steps and I will be really glad to merge your work and add you to the contributors!
Fork the project
Clone it and create a branch with the name of the feature you intend to add
$ git clone firstname.lastname@example.org:username/onionskin.git $ git checkout -b new-feature-name
Install the dependencies
$ bower install # for browser tests $ npm install # for node.js tests
Please add tests to your features.
- Tests run with Mocha and use Chai for expectations.
- Expect is preferred to should due to browser compatibility
- The test folder respect the same structure as the source, you can run the tests through npm:
$ npm test
or run specific tests with mocha:
you also can run the tests on browser
Send me a pull request
What is coming next
- WebSQL, Cassandra, MongoDB [, ... ] drivers
- More examples
- The function to generate missing cache should be passed as the last parameter to
pool.get, although generating cache
Promise.catchis still supported the cache will never be unlocked if
item.setare not called.
- Also when the cache generator function is passed as parameter, there is no need to call either
item.set, just return the value you want to be cached and it will automatically saved and passed along to the promise chain.