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

superjson

Package Overview
Dependencies
Maintainers
4
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superjson - npm Package Compare versions

Comparing version 1.9.0 to 1.9.1

3

dist/esm/index.d.ts

@@ -8,2 +8,5 @@ import { SuperJSONResult, SuperJSONValue, Class, JSONValue } from './types';

export declare const parse: <T = unknown>(string: string) => T;
export declare const registerClass: (v: Class, options?: string | RegisterOptions | undefined) => void;
export declare const registerSymbol: (v: Symbol, identifier?: string | undefined) => void;
export declare const registerCustom: <I, O extends JSONValue>(transformer: Omit<CustomTransfomer<I, O>, "name">, name: string) => void;
declare const _default: {

@@ -10,0 +13,0 @@ stringify: (object: any) => string;

6

dist/esm/index.js

@@ -50,9 +50,9 @@ var __assign = (this && this.__assign) || function () {

};
var registerClass = function (v, options) {
export var registerClass = function (v, options) {
return ClassRegistry.register(v, options);
};
var registerSymbol = function (v, identifier) {
export var registerSymbol = function (v, identifier) {
return SymbolRegistry.register(v, identifier);
};
var registerCustom = function (transformer, name) {
export var registerCustom = function (transformer, name) {
return CustomTransformerRegistry.register(__assign({ name: name }, transformer));

@@ -59,0 +59,0 @@ };

@@ -8,2 +8,5 @@ import { SuperJSONResult, SuperJSONValue, Class, JSONValue } from './types';

export declare const parse: <T = unknown>(string: string) => T;
export declare const registerClass: (v: Class, options?: string | RegisterOptions | undefined) => void;
export declare const registerSymbol: (v: Symbol, identifier?: string | undefined) => void;
export declare const registerCustom: <I, O extends JSONValue>(transformer: Omit<CustomTransfomer<I, O>, "name">, name: string) => void;
declare const _default: {

@@ -10,0 +13,0 @@ stringify: (object: any) => string;

@@ -14,3 +14,3 @@ "use strict";

exports.__esModule = true;
exports.parse = exports.stringify = exports.deserialize = exports.serialize = void 0;
exports.registerCustom = exports.registerSymbol = exports.registerClass = exports.parse = exports.stringify = exports.deserialize = exports.serialize = void 0;
var class_registry_1 = require("./class-registry");

@@ -61,8 +61,11 @@ var symbol_registry_1 = require("./symbol-registry");

};
exports.registerClass = registerClass;
var registerSymbol = function (v, identifier) {
return symbol_registry_1.SymbolRegistry.register(v, identifier);
};
exports.registerSymbol = registerSymbol;
var registerCustom = function (transformer, name) {
return custom_transformer_registry_1.CustomTransformerRegistry.register(__assign({ name: name }, transformer));
};
exports.registerCustom = registerCustom;
exports["default"] = {

@@ -73,7 +76,7 @@ stringify: exports.stringify,

deserialize: exports.deserialize,
registerClass: registerClass,
registerSymbol: registerSymbol,
registerCustom: registerCustom,
registerClass: exports.registerClass,
registerSymbol: exports.registerSymbol,
registerCustom: exports.registerCustom,
allowErrorProps: error_props_1.allowErrorProps
};
//# sourceMappingURL=index.js.map
{
"version": "1.9.0",
"version": "1.9.1",
"license": "MIT",

@@ -4,0 +4,0 @@ "main": "dist/index.js",

@@ -11,3 +11,3 @@ <p align="center">

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors"><img src="https://img.shields.io/badge/all_contributors-19-orange.svg?style=flat-square" alt="All Contributors"/></a>
<a href="#contributors"><img src="https://img.shields.io/badge/all_contributors-22-orange.svg?style=flat-square" alt="All Contributors"/></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->

@@ -282,2 +282,5 @@ <a href="https://www.npmjs.com/package/superjson">

</tr>
<tr>
<td align="center"><a href="https://github.com/ruessej"><img src="https://avatars.githubusercontent.com/u/85690286?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ruessej</b></sub></a><br /><a href="https://github.com/blitz-js/superjson/issues?q=author%3Aruessej" title="Bug reports">πŸ›</a></td>
</tr>
</table>

@@ -284,0 +287,0 @@

@@ -69,9 +69,9 @@ import { SuperJSONResult, SuperJSONValue, Class, JSONValue } from './types';

const registerClass = (v: Class, options?: RegisterOptions | string) =>
export const registerClass = (v: Class, options?: RegisterOptions | string) =>
ClassRegistry.register(v, options);
const registerSymbol = (v: Symbol, identifier?: string) =>
export const registerSymbol = (v: Symbol, identifier?: string) =>
SymbolRegistry.register(v, identifier);
const registerCustom = <I, O extends JSONValue>(
export const registerCustom = <I, O extends JSONValue>(
transformer: Omit<CustomTransfomer<I, O>, 'name'>,

@@ -78,0 +78,0 @@ name: string

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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