
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
sync-storage
Advanced tools
Synchronous storage for React Native AsyncStorage.
yarn add sync-storage
# or
# npm i --save sync-storage
import SyncStorage from 'sync-storage';
SyncStorage.set('foo', 'bar');
const result = SyncStorage.get('foo');
console.log(result); // 'bar'
Init prepares the SyncStorage to work synchronously, by getting all values for all keys previously saved on RN AsyncStorage. See the example:
const data = await SyncStorage.init();
console.log('AsyncStorage is ready!', data);
Returns the value of key.
SyncStorage.get('foo'); // 'bar'
It saves the value on memory and on the AsyncStorage.
SyncStorage.set('foo', 'bar');
SyncStorage.get('foo'); // 'bar'
It also returns a Promise for post verification.
SyncStorage.set('foo', 'bar')
.then(() => {
SyncStorage.get('foo'); // 'bar'
})
.catch(error => {
console.log(error);
});
It removes the value from the memory and from the AsyncStorage.
SyncStorage.remove('foo');
It also returns a Promise for post verification.
SyncStorage.remove('foo')
.then(() => {
SyncStorage.get('foo'); // undefined
})
.catch(error => {
console.log(error);
});
returns an array from all the keys.
SyncStorage.set('foo', 'bar');
SyncStorage.set('boo', 'baz');
console.log(SyncStorage.getAllKeys()) // ['foo', 'boo']
FAQs
Synchronous storage for React Native.
The npm package sync-storage receives a total of 737 weekly downloads. As such, sync-storage popularity was classified as not popular.
We found that sync-storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.