@jitsi/js-utils
Advanced tools
Comparing version 2.1.1 to 2.1.2
11
json.js
import Bourne from '@hapi/bourne'; | ||
/** | ||
* Safely parse JSON payloads. Makes sure the return value it's either an object | ||
* or an error. | ||
* Safely parse JSON payloads. | ||
* | ||
@@ -11,9 +10,3 @@ * @param {string} data - The payload to be parsed. | ||
export function safeJsonParse(data) { | ||
const json = Bourne.parse(data); | ||
if (json && typeof json === 'object') { | ||
return json; | ||
} | ||
return {}; | ||
return Bourne.parse(data); | ||
} |
{ | ||
"name": "@jitsi/js-utils", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Utilities for Jitsi JS projects", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135106
2714