Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
persistent-storage
Advanced tools
Abstracts access to any storage object implementing the webstorage Storage interface, offering optional compression using lz-string and optional encryption using crypto
Abstracts access to any storage object implementing the webstorage Storage interface, and provides some extra features:
See interfaces for documentation of configuration object
//Without Scoping
var PersistentStore = require('persistent-store')
var store = new PersistentStorage({
useCompression: false,
storageBackend: new StorageShim()
})
store.setItem("myObj", {foo: "bar"})
console.log(store.getItem("myObj")) // Prints {foo: "bar"}
//With scoping
var fred = new PersistentStorage({
useCompression: true,
keyPrefix: 'fred'
storageBackend: new StorageShim()
})
var bob = new PersistentStorage({
useCompression: false,
keyPrefix: 'bob'
storageBackend: new StorageShim()
})
fred.setItem("name", "Fred")
bob.setItem("name", "Bob")
console.log(fred.getItem("name")) // prints Fred
console.log(bob.getItem("name")) // prints Bob
See unit tests here for further examples
persistent-storage is available as an npm package. Simply run:
npm install --save persistent-storage
A typescript definition file is provided with the package and will be automatically used by the typescript compiler
The unit tests use mocha and phantomjs, and are setup to run by the standard npm test command.
npm install
npm test
You can also run them using the browser of your choice by opening the html file found here
FAQs
Abstracts access to any storage object implementing the webstorage Storage interface, offering optional compression using lz-string and optional encryption using crypto
We found that persistent-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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.