
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.
react-native-preference
Advanced tools
Manage react-native app's preference data synchronously
# install library from npm
npm install react-native-preference --save
# link native code
react-native link react-native-preference
import Preference from 'react-native-preference';
Preference.get(key?: String)
// get all preferences
const preferences = Preference.get();
// get preference named `some-preference`
const preference = Preference.get('some-preference');
Preference.set(key: String|Object, value?: String): Promise
// set one preference
Preference.set('key', 'value');
// set multiple preferences
Preference.set({
key: 'value',
foo: 'bar'
});
Preference.clear(key?: String): Promise
// clear all preference data
Preference.clear();
// clear preference for key 'foo'
Preference.clear('foo');
// set keys to white list, when preference value changed in white list changed, listener calls back.
Preference.setWhiteList(['a', 'b', 'c']);
Preference.addPrefernceChangedListener(() => {
this.setState({
preference: Preference.get(),
});
});
FAQs
Manage react-native app's preference data synchronously
The npm package react-native-preference receives a total of 26 weekly downloads. As such, react-native-preference popularity was classified as not popular.
We found that react-native-preference demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.