Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jmondi/browser-storage

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jmondi/browser-storage - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

dist/browser_storage.d.ts

6

package.json
{
"name": "@jmondi/browser-storage",
"version": "1.0.5",
"version": "1.0.6",
"author": "Jason Raimondi <jason@raimondi.us>",

@@ -21,6 +21,6 @@ "main": "dist/browser_storage.js",

"test": "jest",
"swc": "swc ./src -d ./dist --ignore ./src/**/*.spec.*",
"build": "tsc"
"build": "tsc",
"prepublish": "rm -rf ./dist && pnpm test && pnpm build"
},
"readme": "# @jmondi/browser-storage\n\nSupports null and serializable objects.\n\n## Install\n\n```bash\nnpm install @jmondi/browser-storage\n```\n\n## Usage \n\n### Local Storage\n\nLocal storage is persistent after close.\n\n```typescript\nimport { LocalStorage } from \"@jmondi/browser-storage\";\n\nconst localStorage = new LocalStorage();\n\nlocalStorage.set(\"user1\", null);\nlocalStorage.set(\"user2\", { email: \"hermoine@hogwarts.com\", name: \"Hermoine\" });\n\nconsole.log(localStorage.get(\"user1\"));\n// null\nconsole.log(localStorage.get(\"user2\"));\n// { email: \"hermoine@hogwarts.com\", name: \"Hermoine\" }\n```\n\n### Session Storage\n\nSession storage is reset when the browser is closed.\n\n```typescript\nimport { SessionStorage } from \"@jmondi/browser-storage\";\n\nconst sessionStorage = new SessionStorage();\n\nsessionStorage.set(\"user1\", null);\nsessionStorage.set(\"user2\", { email: \"hermoine@hogwarts.com\", name: \"Hermoine\" });\n\nconsole.log(sessionStorage.get(\"user1\"));\n// null\nconsole.log(sessionStorage.get(\"user2\"));\n// { email: \"hermoine@hogwarts.com\", name: \"Hermoine\" }\n```"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc