New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mp-debug

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mp-debug - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "mp-debug",
"version": "0.1.0",
"version": "0.1.1",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

@@ -17,3 +17,6 @@ # mp-debug

import debug from 'mp-debug';
// in mini-program
wx.setStorageSync('debug', 'worker:*');
// in browser
localStorage.debug = 'worker:*';
```

@@ -20,0 +23,0 @@

@@ -246,8 +246,18 @@ /* eslint-env browser */

// The Browser also has localStorage in the global context.
return {
setItem: (key, value) => wx.setStorageSync(key, value),
getItem: (key) => wx.getStorageSync(key),
removeItem: (key) => wx.removeStorageSync(key)
if (wx && wx.getStorageSync) {
return {
setItem: (key, value) => wx.setStorageSync(key, value),
getItem: (key) => wx.getStorageSync(key),
removeItem: (key) => wx.removeStorageSync(key)
}
}
if (window && window.localStorage) {
return localStorage;
}
} catch (error) {
if (window && window.localStorage) {
return localStorage;
}
console.error('get storage error', error);
// Swallow

@@ -254,0 +264,0 @@ // XXX (@Qix-) should we be logging these?

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