cycle-native-asyncstorage
v3.2.0
Published
A Cycle.js Driver for using AsyncStorage from React Native
Downloads
11
Maintainers
Readme
Cycle Native AsyncStorage
A Cycle.js Driver for using the AsyncStorage from React Native
npm install cycle-native-asyncstorage
Usage
Sink
Stream of command objects, either one of these:
{
type: 'clear';
}
{
type: 'setItem';
key: string;
value: string;
}
{
type: 'mergeItem';
key: string;
value: string;
}
{
type: 'removeItem';
key: string;
}
{
type: 'multiSet';
keyValuePairs: Array<[string, string]>;
}
{
type: 'multiMerge';
keyValuePairs: Array<[string, string]>;
}
{
type: 'multiRemove';
keys: Array<string>;
};
Source
An object with these methods:
{
getAllKeys(): Stream<Array<string>>;
getItem(key: string): Stream<string>;
multiGet(keys: Array<string>): Stream<Array<[string, string]>>;
}
License
Copyright (C) 2018 Andre 'Staltz' Medeiros, licensed under MIT license