
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
browser-storage
Advanced tools
Normalizes localStorage usage between Browser and Node.js. May include sessionStorage support in the future.
You probably will almost never need this. Why would you want to use it then? Let's say that you're developing a component that you want to use in both Node.js and the browser (via Browserify) and you want an easy way to persist state. To persist state, on Node.js your options are endless. On the browser you have the option of cookies (awful idea), local storage, web sql, file api, indexeddb. Other than cookies, local storage is the one that's most widely available. This package just normalizes the behavior of local storage between the two environments since local storage is not availabe on Node.js.
npm install --save browser-storage
Note: Just like localStorage, if you want to save an object, you'll want to stringify it e.g. JSON.stringify
var bs = require('browser-storage')
bs.setItem('name', 'jp')
console.log(bs.getItem('name')) // => jp
To hack on this module, clone it and ensure you have testling installed.
To run node tests:
npm test
To run browser tests:
testling
MIT
FAQs
Normalizes local storage behavior for the browser and node
The npm package browser-storage receives a total of 16 weekly downloads. As such, browser-storage popularity was classified as not popular.
We found that browser-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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.