record.js/README.md

42 lines
1.1 KiB
Markdown
Raw Normal View History

2018-04-02 04:35:22 +00:00
# Record.js
> A minimalistic dead-simple object collection library
2018-04-02 04:41:13 +00:00
Go kick the tires in [`dist/`](https://raw.githubusercontent.com/n2geoff/record.js/master/dist/record.min.js)
2018-04-02 04:35:22 +00:00
## WIP
Not done yet!
2018-04-07 04:11:28 +00:00
## API
2018-04-02 04:35:22 +00:00
2018-04-07 04:11:28 +00:00
The public API is very simple, only really need 3 methods: `add`, `remove`, and `find`.
| Method | Description |
| --- | ---|
| `.add(object)` | Adds entry to collection and return entry added |
| `.remove(id|object)` | Removes entry(s) from collection and returns removed |
| `.find(id|object)` | find all, find by id, or find by filter, returns array of entries |
| `.count()` | returns number of records in collection |
> SEE: [API Documentation](docs/api.md)
### Options
- store: localStorage KEY to use.
2018-04-02 04:35:22 +00:00
## Tests
npm test
2018-04-02 11:21:19 +00:00
## Support
Please open [an issue](https://github.com/n2geoff/record.js/issues/new) for support.
## Contributing
Anyone is welcome to contribute, however, if you decide to get involved, please take a moment to review the [guidelines](CONTRIBUTING.md), there minimalistic;)
## License
[MIT](LICENSE)