@hydrant/lang-conversion

0.2.5 • Public • Published

lang-conversion

install

npm install --save @hydrant/lang-conversion

usage

deserialize (import)

import { deserialize } from '@hydrant/lang-conversion';
const content = '{ "foo": "bar" }';

const result = await deserialize({ content, deserializer: 'json' });

You can also pass in filename instead of setting deserializer.

serialize (export)

import { serialize } from '@hydrant/lang-conversion';
const entries = [{ id: 'foo', value: 'bar' }];
const meta = { version: 3, date: '9.9.2020' };

const result = await serialize({ entries, meta, serializer: 'xml' });

You can also pass in filename instead of setting serializer.

Readme

Keywords

none

Package Sidebar

Install

npm i @hydrant/lang-conversion

Weekly Downloads

2

Version

0.2.5

License

MIT

Unpacked Size

3.72 MB

Total Files

21

Last publish

Collaborators

  • mheckel
  • fiws
  • hydra-newmedia