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

typeson-registry

Package Overview
Dependencies
Maintainers
0
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typeson-registry

The type registry for typeson

  • 11.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
242K
increased by2.44%
Maintainers
0
Weekly downloads
 
Created

What is typeson-registry?

The typeson-registry npm package is a collection of types for Typeson, a library that allows you to serialize and deserialize JavaScript objects with custom types. It provides a registry of common types that can be used to extend the functionality of Typeson.

What are typeson-registry's main functionalities?

Date Serialization

This feature allows you to serialize and deserialize Date objects. The code sample demonstrates how to register the date type from typeson-registry and use it to serialize and deserialize a Date object.

{"import":"import Typeson from 'typeson';\nimport typesonRegistry from 'typeson-registry';","usage":"const typeson = new Typeson().register(typesonRegistry.date);\nconst serialized = typeson.stringify(new Date());\nconst deserialized = typeson.parse(serialized);"}

Set Serialization

This feature allows you to serialize and deserialize Set objects. The code sample demonstrates how to register the set type from typeson-registry and use it to serialize and deserialize a Set object.

{"import":"import Typeson from 'typeson';\nimport typesonRegistry from 'typeson-registry';","usage":"const typeson = new Typeson().register(typesonRegistry.set);\nconst serialized = typeson.stringify(new Set([1, 2, 3]));\nconst deserialized = typeson.parse(serialized);"}

Map Serialization

This feature allows you to serialize and deserialize Map objects. The code sample demonstrates how to register the map type from typeson-registry and use it to serialize and deserialize a Map object.

{"import":"import Typeson from 'typeson';\nimport typesonRegistry from 'typeson-registry';","usage":"const typeson = new Typeson().register(typesonRegistry.map);\nconst serialized = typeson.stringify(new Map([[1, 'one'], [2, 'two']]));\nconst deserialized = typeson.parse(serialized);"}

Other packages similar to typeson-registry

Keywords

FAQs

Package last updated on 21 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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