Socket
Book a DemoInstallSign in
Socket

@hydrant/lang-conversion

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hydrant/lang-conversion

## install

latest
npmnpm
Version
0.2.5
Version published
Maintainers
3
Created
Source

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.

FAQs

Package last updated on 19 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts