qipp-services-io
v1.0.1
Published
IO service for Angular application.
Downloads
10
Readme
qipp-services-io
General
The io service is used as a unique shared interface in order to perform read/write actions, typically like localStorage/cookieStorage.
Install
npm i qipp-services-io
Angular usage
In the config phase of your application
For example, if you want to set the service to be tied to the localStorageService from angular-local-storage:
ioProvider.defaults.provider = 'localStorageService'
ioProvider.defaults.getMethod = 'get'
ioProvider.defaults.setMethod = 'set'
ioProvider.defaults.clearMethod = 'clearAll'
Accessing methods
Then you can perfom the usual I/O operations needed:
io.set('oneProperty', 123)
io.get('oneProperty') // 123
// Clear all values.
io.clear()
Tools
Linting with StandardJS
Please refer to the JavaScript Standard Style for general rules.
npm run lint
Unit testing with Karma
npm test
Requirements
Angular
- angular 1.4.3
Qipp modules
- qipp-services-relay 0.1.0
Licence
Released under the MIT license by qipp.