npm.io
1.0.0 • Published 8 years ago

watercress-react-native

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0

Watercress

Simple AsyncStorage wrapper for React native.

Just install:

npm i watercress-react-native --save

Then import:

import * as cress from 'watercress-react-native';

And use:

cress.set('cress', 'water').then(() => null)
cress.get('cress').then(() => null)
cress.rm('cress').then(() => null)

Every method returns promise. You also can pass JSON as a second parameter for set method and it will be stringifyed. Also, get method returns parsed JSON if value is JSON.

Wow, so cool, such innovation.

Keywords