react-native-storer

1.0.2 • Public • Published

Storer

Easy React Native storage.

import { clearStorage, getStorage, setStorage } from 'react-native-storer';

Get a single key

const age = await getStorage('age');

Get multiple keys:

const { name, age } = await getStorage(['name', 'age']);

Set a single key:

await setStorage('age', 21);

Set multiple keys:

await setStorage({ name: 'Bob', age: 28 });

Set a key from a previous value:

await setStorage('friends', friends => ([...friends, 'Joe']));

Get all keys:

await getStorage();

Remove a key:

await setStorage('friends');

Clear all storage:

await clearStorage();

Package Sidebar

Install

npm i react-native-storer

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

3.58 kB

Total Files

3

Last publish

Collaborators

  • stevebinder