|
| 1 | +<img src="https://raw.githubusercontent.com/js-data/js-data/master/js-data.png" alt="js-data logo" title="js-data" align="right" width="64" height="64" /> |
| 2 | + |
| 3 | +## js-data-asyncstorage [](https://www.npmjs.org/package/js-data-asyncstorage) [](https://www.npmjs.org/package/js-data-asyncstorage) [](https://circleci.com/gh/js-data/js-data-asyncstorage/tree/master) [](https://www.npmjs.org/package/js-data-asyncstorage) [](https://github.com/lukasreichart/js-data-asyncstorage/blob/master/LICENSE) |
| 4 | + |
| 5 | +react-native AsyncStorage adapter for [js-data](http://www.js-data.io/). |
| 6 | + |
| 7 | +### API Documentation |
| 8 | +[DSAsyncStorageAdapter](http://www.js-data.io/docs/dsasyncstorageadapter) |
| 9 | + |
| 10 | +### Demo |
| 11 | +[https://js-data-asyncstorage.firebaseapp.com/](https://js-data-asyncstorage.firebaseapp.com/) |
| 12 | + |
| 13 | +### Project Status |
| 14 | + |
| 15 | +__Latest Release:__ [](https://github.com/lukasreichart/js-data-asyncstorage/releases) |
| 16 | + |
| 17 | +### Quick Start |
| 18 | +`bower install --save js-data js-data-asyncstorage` or `npm install --save js-data js-data-asyncstorage`. |
| 19 | + |
| 20 | +Load `js-data-asyncstorage.js` after `js-data.js`. |
| 21 | + |
| 22 | +```js |
| 23 | +var adapter = new DSAsyncStorageAdapter(); |
| 24 | + |
| 25 | +var store = new JSData.DS(); |
| 26 | +store.registerAdapter('asyncstorage', adapter, { default: true }); |
| 27 | + |
| 28 | +// "store" will now use the asyncstorage adapter for all async operations |
| 29 | +``` |
| 30 | + |
| 31 | +### Changelog |
| 32 | +[CHANGELOG.md](https://github.com/lukasreichart/js-data-asyncstorage/blob/master/CHANGELOG.md) |
| 33 | + |
| 34 | +### Community |
| 35 | +- [Mailing List](https://groups.io/org/groupsio/jsdata) - Ask your questions! |
| 36 | +- [Issues](https://github.com/lukasreichart/js-data-asyncstorage/issues) - Found a bug? Feature request? Submit an issue! |
| 37 | +- [GitHub](https://github.com/lukasreichart/js-data-asyncstorage) - View the source code for js-data. |
| 38 | +- [Contributing Guide](https://github.com/lukasreichart/js-data-asyncstorage/blob/master/CONTRIBUTING.md) |
| 39 | + |
| 40 | +### Contributing |
| 41 | + |
| 42 | +# Contributing Guide |
| 43 | + |
| 44 | +First, support is handled via the [Mailing List](https://groups.io/org/groupsio/jsdata). Ask your questions there. |
| 45 | + |
| 46 | +When submitting issues on GitHub, please include as much detail as possible to make debugging quick and easy. |
| 47 | + |
| 48 | +- good - Your versions of Angular, JSData, etc, relevant console logs/error, code examples that revealed the issue |
| 49 | +- better - A [plnkr](http://plnkr.co/), [fiddle](http://jsfiddle.net/), or [bin](http://jsbin.com/?html,output) that demonstrates the issue |
| 50 | +- best - A Pull Request that fixes the issue, including test coverage for the issue and the fix |
| 51 | + |
| 52 | +[Github Issues](https://github.com/lukasreichart/js-data-asyncstorage/issues). |
| 53 | + |
| 54 | +#### Pull Requests |
| 55 | + |
| 56 | +1. Contribute to the issue that is the reason you'll be developing in the first place |
| 57 | +1. Fork js-data-asyncstorage |
| 58 | +1. `git clone https://github.com/<you>/js-data-asyncstorage.git` |
| 59 | +1. `cd js-data-asyncstorage; npm install; bower install;` |
| 60 | +1. You need to follow the instructions in src/index.js to be able to run the tests without react-native. |
| 61 | +1. `grunt go` (builds and starts a watch) |
| 62 | +1. (in another terminal) `grunt karma:dev` (runs the tests) |
| 63 | +1. Write your code, including relevant documentation and tests |
| 64 | +1. Submit a PR and we'll review |
| 65 | + |
| 66 | +### License |
| 67 | + |
| 68 | +This adapter is mainly based on the work of [Jason Dobry](https://github.com/jmdobry) |
| 69 | +for the [js-data-localstorage](https://github.com/js-data/js-data-localstorage) adapter. |
| 70 | + |
| 71 | +The MIT License (MIT) |
| 72 | + |
| 73 | +Copyright (c) 2015 Lukas Reichart & Jason Dobry |
| 74 | + |
| 75 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 76 | +of this software and associated documentation files (the "Software"), to deal |
| 77 | +in the Software without restriction, including without limitation the rights |
| 78 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 79 | +copies of the Software, and to permit persons to whom the Software is |
| 80 | +furnished to do so, subject to the following conditions: |
| 81 | + |
| 82 | +The above copyright notice and this permission notice shall be included in all |
| 83 | +copies or substantial portions of the Software. |
| 84 | + |
| 85 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 86 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 87 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 88 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 89 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 90 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 91 | +SOFTWARE. |
0 commit comments