@golden-tiger/serializer

0.0.3 • Public • Published

@golden-tiger/serializer

parse

Parse a string to a valid JS value.

stringify

Serialize a JS value to a JS string.

Example

import Serializer from '@golden-tiger/serializer'; // mjs
const Serializer = require('@golden-tiger/serializer'); // cjs

console.log(Serializer.parse('[true]'));
// [true]

console.log(Serializer.stringify([true]));
// [
//  true
// ]

Package Sidebar

Install

npm i @golden-tiger/serializer

Weekly Downloads

1

Version

0.0.3

License

Apache-2.0

Unpacked Size

28 kB

Total Files

10

Last publish

Collaborators

  • tigercheng