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

destr

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

destr - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [0.1.7](https://github.com/nuxt-contrib/destr/compare/v0.1.6...v0.1.7) (2020-05-27)
### Bug Fixes
* don't throw error on parse fail ([65e22c6](https://github.com/nuxt-contrib/destr/commit/65e22c631ef2757d0b25d77e1270f4656bca7ef8))
### [0.1.6](https://github.com/nuxt-contrib/destr/compare/v0.1.5...v0.1.6) (2020-05-27)

@@ -7,0 +14,0 @@

12

dist/index.js

@@ -52,9 +52,13 @@ 'use strict';

if (suspectProtoRx.test(val) || suspectConstructorRx.test(val)) {
return JSON.parse(val, jsonParseTransform);
try {
if (suspectProtoRx.test(val) || suspectConstructorRx.test(val)) {
return JSON.parse(val, jsonParseTransform);
}
return JSON.parse(val);
} catch (_e) {
return val;
}
return JSON.parse(val);
}
module.exports = destr;
{
"name": "destr",
"version": "0.1.6",
"version": "0.1.7",
"description": "A faster, secure and convenient alternative for JSON.parse",

@@ -5,0 +5,0 @@ "repository": "nuxt-contrib/destr",

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