# avroize-es6

> avroize-es6

Latest version **0.1.4** (published 2017-10-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install avroize-es6
pnpm add avroize-es6
yarn add avroize-es6
bun add avroize-es6
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2017-10-17 |
| First published | 2017-10-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+10 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | edgrams |
| Maintainers | edgrams |

## Links

- npm: https://www.npmjs.com/package/avroize-es6
- Repository: https://github.com/avroize/avroize-es6
- Homepage: https://github.com/avroize/avroize-es6#readme
- Issues: https://github.com/avroize/avroize-es6/issues
- npm.io page: https://npm.io/package/avroize-es6

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) 4.17.4

## Recent versions

- 0.1.4 (latest) — 2017-10-17
- 0.1.3 — 2017-10-15
- 0.1.2 — 2017-10-15
- 0.1.1 — 2017-10-15
- 0.1.0 — 2017-10-15

## README

# avroize-es6

[![Build Status](https://travis-ci.org/avroize/avroize-es6.svg?branch=master)](https://travis-ci.org/avroize/avroize-es6) 
[![Coverage Status](https://coveralls.io/repos/github/avroize/avroize-es6/badge.svg)](https://coveralls.io/github/avroize/avroize-es6) 
[![npm version](https://img.shields.io/npm/v/avroize-es6.svg?style=flat)](https://www.npmjs.com/package/avroize-es6)

Transform your data into valid Avro JSON for any given Avro schema.

### Support for MVP release:
* Primitive types: *Boolean, Double, Float, Integer, Long, String*
* Complex types: *Arrays, Records, Unions (null only)*
* JSON Avroizer

## Getting Started

Install Avroize using `npm`:

```
npm install --save avroize-es6
```

Avroize JSON data:

```javascript
import {getJSONAvroizer} from 'avroize-es6'

const avroSchema = {
    "name": "example",
    "namespace": "avro.test",
    "type": "record",
    "fields":[{
        "default": "",
        "name": "field1",
        "type": "string"
    },{
        "default": null,
        "name": "field2",
        "type": ["null", "string"]
    }]
};

const avroizer = getJSONAvroizer(avroSchema);

const result = avroizer.avroize({"field1":"test"});

console.log(result); // {"field1": "test", "field2": null}
```

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