@joshdb/serialize
A serialize utility for the Josh project
This package has been deprecated. Please use the better-serialize instead.
Description
A utility to serialize Node.js data types to and from a JSON compatible format.
Features
- Written in TypeScript
- Offers ESM and CommonJS support
- Fully tested
Installation
You can use the following command to install this package, or replace npm install
with your package manager of choice.
npm install @joshdb/serialize
Quick Start
import { Serialize } from '@joshdb/serialize';
Serialize.toJSON('Hello World!'); // { type: 'string', value: 'Hello World!' }
Serialize.fromJSON({ type: 'string', value: 'Hello World!' }); // 'Hello World!'