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

@brillout/json-serializer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brillout/json-serializer - npm Package Compare versions

Comparing version 0.5.9 to 0.5.10

2

dist/cjs/parse.d.ts
export { parse };
export { parseTransform };
declare function parse(str: string): unknown;
declare function parseTransform(value: unknown): unknown;

9

dist/cjs/parse.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = void 0;
exports.parseTransform = exports.parse = void 0;
const types_1 = require("./types");

@@ -8,6 +8,6 @@ function parse(str) {

const value = JSON.parse(str);
return modifier(value);
return parseTransform(value);
}
exports.parse = parse;
function modifier(value) {
function parseTransform(value) {
if (typeof value === 'string') {

@@ -22,3 +22,3 @@ return reviver(value);

;
value[key] = modifier(val);
value[key] = parseTransform(val);
});

@@ -28,2 +28,3 @@ }

}
exports.parseTransform = parseTransform;
function reviver(value) {

@@ -30,0 +31,0 @@ for (const { match, deserialize } of types_1.types) {

export { parse };
export { parseTransform };
declare function parse(str: string): unknown;
declare function parseTransform(value: unknown): unknown;
export { parse };
export { parseTransform };
import { types } from './types';

@@ -6,5 +7,5 @@ function parse(str) {

const value = JSON.parse(str);
return modifier(value);
return parseTransform(value);
}
function modifier(value) {
function parseTransform(value) {
if (typeof value === 'string') {

@@ -19,3 +20,3 @@ return reviver(value);

;
value[key] = modifier(val);
value[key] = parseTransform(val);
});

@@ -22,0 +23,0 @@ }

{
"name": "@brillout/json-serializer",
"version": "0.5.9",
"version": "0.5.10",
"description": "Same as JSON but with added support for `Date`, `undefined`, `Map`, `Set`, and more.",

@@ -5,0 +5,0 @@ "main": "./index.mjs",

@@ -11,1 +11,2 @@ // Some tools don't support `package.json#exports`, such as:

exports.parse = require('./dist/cjs/parse.js').parse;
exports.parseTransform = require('./dist/cjs/parse.js').parseTransform;
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