# ice-to-plain

> Convert Ice stuff to and from plain JS objects

Latest version **0.2.9** (published 2020-05-25) · GPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install ice-to-plain
pnpm add ice-to-plain
yarn add ice-to-plain
bun add ice-to-plain
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.9 |
| Published | 2020-05-25 |
| First published | 2018-01-22 |
| Weekly downloads | 0 |
| License | GPL-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 47.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Daniel Lytkin |
| Maintainers | aikoven |

## Links

- npm: https://www.npmjs.com/package/ice-to-plain
- Repository: https://github.com/aikoven/ice-to-plain
- Homepage: https://github.com/aikoven/ice-to-plain#readme
- Issues: https://github.com/aikoven/ice-to-plain/issues
- npm.io page: https://npm.io/package/ice-to-plain

## Dependencies (2)

- [ice](https://npm.io/package/ice.md) ~3.7.0
- [json-stringifier](https://npm.io/package/json-stringifier.md) ^0.1.0

## Recent versions

- 0.2.9 (latest) — 2020-05-25
- 0.2.8 — 2020-04-09
- 0.2.7 — 2020-04-08
- 0.2.6 — 2019-04-18
- 0.2.5 — 2018-12-25
- 0.2.4 — 2018-10-26
- 0.2.3 — 2018-10-03
- 0.2.2 — 2018-09-28
- 0.2.1 — 2018-09-28
- 0.2.0 — 2018-09-28
- 0.2.0-beta.0 — 2018-09-26
- 0.1.5 — 2018-09-18
- 0.1.4 — 2018-05-04
- 0.1.3 — 2018-04-04
- 0.1.2 — 2018-04-04
- … 2 more at https://npm.io/package/ice-to-plain/versions

## README

# Ice to Plain [![npm version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]

Convert Ice stuff to and from plain JS objects.
Supports `long`, `enum`, `struct`, `dictionary`, `exception` and `class`,
as well as JS objects, arrays, Maps and Sets.

## Installation

    $ npm install ice-to-plain

## Usage

```ts
import {iceToPlain, iceToJson, iceFromPlain} from 'ice-to-plain';
import {isEqual} from 'lodash';

const plain = iceToPlain(someIceValue);
isEqual(someIceValue, iceFromPlain(plain)); // true

// 4-5x faster than JSON.stringify for Ice objects
// but 4-5x slower on regular JS objects
const json = iceToJson(someIceValue);
```

[npm-image]: https://badge.fury.io/js/ice-to-plain.svg
[npm-url]: https://badge.fury.io/js/ice-to-plain
[travis-image]: https://travis-ci.org/aikoven/ice-to-plain.svg?branch=master
[travis-url]: https://travis-ci.org/aikoven/ice-to-plain

---
_Source: https://npm.io/package/ice-to-plain · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
