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

pet-shop

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pet-shop - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

11

index.js
// @ts-nocheck
function safeParse(string) {
try {
return JSON.parse(string);
} catch {
return undefined;
}
}
export function PetShop({ storage, namespace, json = false }) {

@@ -17,3 +26,3 @@ return Object.defineProperties(

const raw = storage.getItem(`${namespace}.${key}`);
return raw !== null ? JSON.parse(raw) : undefined;
return raw !== null ? safeParse(raw) : undefined;
}

@@ -20,0 +29,0 @@ : function get(key) {

4

package.json
{
"name": "pet-shop",
"version": "0.1.0",
"version": "0.1.1",
"description": "A simple wrapper of Web Storage API",

@@ -32,2 +32,2 @@ "license": "MIT",

"type": "module"
}
}
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