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

error-shelter

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-shelter - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

17

errorShelter.js

@@ -13,5 +13,12 @@ // errorShelter.js - Extends the native Error method and stores errors into localStorage obj

// initialize an empty object in localStorage
localStorage.setItem(config.nameSpace, JSON.stringify({errors:[]}));
var initializeEmptyStorage = function () {
localStorage.setItem(config.nameSpace, JSON.stringify({errors:[]}));
};
// check for existing errorShelter in storage and if non exists initialize empty
if (!localStorage.getItem(config.nameSpace)) {
initializeEmptyStorage();
}
var nativeError = Error;

@@ -37,3 +44,4 @@

},
'stack' : e.stack
'stack' : e.stack,
'options' : {}
});

@@ -64,5 +72,6 @@

window.Error[config.nameSpace] = {
getStorage : getStorage
getStorage : getStorage,
emptyStorage : initializeEmptyStorage
}; // makes these methods accessible on the Error method
})();
{
"name": "error-shelter",
"version": "0.1.1",
"version": "0.1.2",
"description": "frontend error catch and storage utility for JS apps.",

@@ -5,0 +5,0 @@ "main": "errorShelter.js",

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