
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
amplify-store
Advanced tools
A node wrapper around amplify.store, to handle cookies in a commonjs style.
A very, very basic node wrapper around the amplify.js store module, to set and fetch data from cookies in a commonjs style.
npm install amplify-store
or
bower install amplify-store
Most of this can be found on the official amplify docs. But, as this is built around the node API, so the methods below assume you've required the file as per the following:
var store = require('amplify-store');
If you've never used amplify.store before, it's really just one method. The arguments provided determines the functionality (fetching, setting, clearing, etc).
store( string key, mixed value [, hash options ] )
Stores a value for a given key using the default storage type.
store( string key );
Gets a stored value based on the key.
store();
Gets a hash of all stored values.
store( string key, null );
Clears key/value pair from the store.
store.storageType( string key, mixed value [, hash options ] );
Stores a value for a given key using an explicit storage type, where storageType is one of the available storage types through amplify.store. The storage types available by default are listed below.
store.storageType( string key )
Gets a stored value based upon key for the explicit storage type.
store.storageType()
Gets a hash of all stored values which were stored through amplify.store.
expires: Duration in milliseconds that the value should be cached.
Support for the following storage types are built into amplify.store and are detected in the order listed. The first available storage type will become the default storage type when using amplify.store().
localStorage
sessionStorage
globalStorage
userData
memory
Store data with amplify storage picking the default storage technology:
var store = require('amplify-store');
store( "storeExample1", { foo: "bar" } );
store( "storeExample2", "baz" );
// retrieve the data later via the key
var myStoredValue = store( "storeExample1" ),
myStoredValue2 = store( "storeExample2" ),
myStoredValues = store();
myStoredValue.foo; // bar
myStoredValue2; // baz
myStoredValues.storeExample1.foo; // bar
myStoredValues.storeExample2; // baz
Store data explicitly with session storage
var store = require('amplify-store');
store.sessionStorage( "explicitExample", { foo2: "baz" } );
// retrieve the data later via the key
var myStoredValue2 = store.sessionStorage( "explicitExample" );
myStoredValue2.foo2; // baz
FAQs
A node wrapper around amplify.store, to handle cookies in a commonjs style.
The npm package amplify-store receives a total of 636 weekly downloads. As such, amplify-store popularity was classified as not popular.
We found that amplify-store 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.