
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.
@jf/storage
Advanced tools
Several classes and polyfills implementing Web Storage API.
You can store item in memory, cookies, files, browser storage, etc. Also, you can encrypt/decrypt data
in storage using jf.storage.serializer classes, and obfuscate keys using key builders.
jf.storage.Proxy it's a proxy to other storages but allow us to do advanced things
adding some behaviors through injection dependency.
We want store data requested to servers with following requirements:
MD5 hash of URLs.
If data is read from http://joaquinfernandez.net/api/users/1, filename will be 05fdf4.jsonconst jfStorageFile = require('jf-storage-api/src/File');
const jfStorageKeyCrypto = require('jf-storage-api/src/key/Crypto');
const jfStorageProxy = require('jf-storage-api/src/Proxy');
const jfStorageSerializerJson = require('jf-storage-api/src/serializer/Json');
function doRequest(url)
{
return {
firstname : 'Homer',
lastname : 'Simpson'
};
}
const storage = new jfStorageProxy(
{
key : new jfStorageKeyCrypto('md5', 6),
serializer : new jfStorageSerializerJson(),
storage : new jfStorageFile('/path/to/cache/directory', '.json')
}
);
// Read data from server.
const url = 'http://joaquinfernandez.net/api/users/1';
const response = doRequest(url);
// Store in cache.
storage.setItem(url, response);
//...
//...
//...
// Retrieve data:
const data = storage.getItem(url);
console.log(data); // { firstname : 'Homer', lastname : 'Simpson' }
Response will be stored in /path/to/cache/directory/05fdf4.json.
FAQs
Classes and polyfills implementing Web Storage API
We found that @jf/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
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.