npm

Need private packages and team management tools?Check out npm Orgs. »

unserializable

0.1.0 • Public • Published

unserializable

build status npm version npm downloads

Utilities for converting unserializable JavaScript objects and instances to serializable objects and vice versa.

Installation

npm install unserializable --save

Usage

This package exports the following:

  • unserializable - An object containing functions that will convert a serializable value to its unserializable form based on its type key.

  • serializable - An object containing functions that will convert an unserializable value to its serializable form based on its type key.

  • getType(value) - Gets the type of some value if it's unserializable.

Currently, the following types are supported:

  • Map - ES6 Map instance
  • Set - ES6 Set instance
  • Date - Date instance
  • RegExp - RegExp instance

Feel free to submit pull requests for more types!

Example

See redux-replicate-localforage.

install

npm i unserializable

Downloadsweekly downloads

2

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability