Skip to main content
Module

x/ts_serialize/docs/installing.md

A zero dependency library for serializing data
Go to Latest
File

🥣 ts_serialize

tests release github doc deno doc License: MIT

Home

Installing

ts_serialize supports both deno and node.

Deno

import/export what you need from https://deno.land/x/ts_serialize@<version>/mod.ts in your deps.ts file. <version> will be a tag found on the deno releases page. The version can be omitted to get the latest release, however, for stability it is recommended to use a tagged version.

export {
  composeStrategy,
  createDateStrategy,
  toSerializable,
  FromJSONStrategy,
  iso8601Date,
  Serializable,
  SerializeProperty,
  ToJSONStrategy,
  TransformKey,
} from "https://deno.land/x/ts_serialize/mod.ts";

Deno Example

Node

Install with NPM

npm i @gamebridgeai/ts_serialize

Then import from the package.

import {
  composeStrategy,
  createDateStrategy,
  toSerializable,
  FromJSONStrategy,
  iso8601Date,
  Serializable,
  SerializeProperty,
  ToJSONStrategy,
  TransformKey,
} from "@gamebridgeai/ts_serialize";

Node Example

Once installed see our docs on how to use Serializable and SerializeProperty