# revivejs

> Javascript json deserializer library for reviving objects along with their prototype/behavior.

Latest version **1.1.0** (published 2021-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install revivejs
pnpm add revivejs
yarn add revivejs
bun add revivejs
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-01-13 |
| First published | 2020-12-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Florin Mihalache |
| Maintainers | mflorin |
| Keywords | javascript, js, revive, serialize, deserialize, unmarshal, typescript, model, object |

## Links

- npm: https://www.npmjs.com/package/revivejs
- Repository: https://github.com/mflorin/revivejs
- Issues: https://github.com/mflorin/revivejs/issues
- npm.io page: https://npm.io/package/revivejs

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.0 (latest) — 2021-01-13
- 1.0.2 — 2020-12-30
- 1.0.1 — 2020-12-30
- 1.0.0 — 2020-12-30

## README

# ReviveJS

[![Version](https://img.shields.io/npm/v/revivejs.svg)](https://npmjs.org/package/revivejs)
![CI](https://github.com/mflorin/revivejs/workflows/CI/badge.svg)
[![Downloads/week](https://img.shields.io/npm/dw/revivejs.svg)](https://npmjs.org/package/revivejs)
[![License](https://img.shields.io/npm/l/revivejs)](https://github.com/mflorin/revivejs/blob/main/package.json)

ReviveJS is a Javascript json deserializer library for reviving objects along with their prototype/behavior.

Think about all the times you had to call an API, retrieve and parse the JSON response and then map that structure to your own models or build behavior around those structures.
ReviveJS simplifies this entire process by reviving entire chains of models in one shot.

```typescript
import { revive } from 'revivejs'

class Person {
    name = ''
    public sayHi() {
        console.log(`Hi, I'm ${this.name}.`)
    }
}

const data = '{"name": "John Smith"}'
const person = revive(data, Person)
person.sayHi() // Hi, I'm John Smith.
```

## Install

`ReviveJS` can be installed using npm
```shell
$ npm install revivejs
```

or yarn
```shell
$ yarn add revivejs
```

## Documentation

Please check out the full [Documentation](https://mflorin.gitbook.io/revivejs/) for more details.

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