
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
local-sync
Advanced tools
A friendly, tiny, synchronous, namespaced, and dependency free local storage solution.
A friendly, tiny, and cross-browser local storage solution:
✓ No dependencies
✓ Synchronous
✓ Namespaced storage support
✓ In-memory fallback
yarn add local-sync
Common JS
https://unpkg.com/local-sync@x.x.x/dist/cjs/local-sync.js
https://unpkg.com/local-sync@x.x.x/dist/cjs/local-sync.min.js
ES Module
https://unpkg.com/local-sync@x.x.x/dist/esm/local-sync.js
https://unpkg.com/local-sync@x.x.x/dist/esm/local-sync.min.js
UMD
https://unpkg.com/local-sync@x.x.x/dist/umd/local-sync.js
https://unpkg.com/local-sync@x.x.x/dist/umd/local-sync.min.js
See API Documentation.
Set or get the current bucket. Subsequent methods operate only in the current bucket namespace.
ls = new LocalSync() // default settings
ls = new LocalSync({ // custom settings
prefix: 'ocean',
bucket: 'fish',
separator: '~'
})
ls.setBucket('BikiniBottom') // => 'BikiniBottom'
ls.getBucket() // => 'BikiniBottom'
List all buckets in storage.
ls.allBuckets() // => [...buckets]
Use any JSON serializable data type.
ls.set('bob', {name: 'SpongeBob'})
ls.get('bob')
// => {name: 'SpongeBob'}
ls.set('quotes', ['Squidward!'])
ls.get('quotes')
// => ['Squidward!]
Update stored objects and arrays.
ls.put('bob', {address: '124 Conch Street'})
// => {name: 'SpongeBob', address: '124 Conch Street'}
ls.put('quotes', ['Why so crabby, Patty?'])
// => ['Squidward!', 'Why so crabby, Patty?']
List all keys in storage.
ls.keys()
// => ['bob', 'quotes']
List all values in storage.
ls.values()
// [
// {address: '124 Conch Street', name: 'SpongeBob'},
// ['Squidward!', 'Why so crabby, Patty?']
// ]
List all keys and values in storage.
ls.getAll()
// [
// {address: '124 Conch Street', name: 'SpongeBob'},
// {quotes: ['Squidward!', 'Why so crabby, Patty?']}
// ]
Remove a single value by key or clear all values.
ls.remove('bob')
ls.keys()
// => ['quotes']
Clear all keys and values.
ls.clear()
ls.keys()
// => []
FAQs
A friendly, tiny, synchronous, namespaced, and dependency free local storage solution.
The npm package local-sync receives a total of 20 weekly downloads. As such, local-sync popularity was classified as not popular.
We found that local-sync demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.