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.2 to 0.1.3

CHANGELOG.MD

22

errorShelter.js

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

var config = {
nameSpace : 'errorShelter',//can be changed to fit app needs
nameSpace : 'errorShelter', //can be changed to fit app needs
availableGlobal : true, // make the nameSpace available either GLOBAL.nameSpace || window.nameSpace
};
// The available methods exposed for API consumption
var publicApi = {
getStorage : getStorage,
emptyStorage : initializeEmptyStorage
};
if (!localStorage) { return console.warn('errorShelter.js - localStorage not supported.'); }

@@ -69,8 +76,13 @@

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

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

# error-shelter
An error logger/handler/storage for front-end apps. Ties in with native JS Error as well as utilizes localStorage for error log preservation which is great for developers wishing to debug user issues.
Use errors as normal:
```
throw new Error('This is an error...');
```
Then retrieve storage whenever:
```
Error.errorShelter.getStorage();
```
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