# onix-gen-funstory

> onix generator

Latest version **0.1.17** (published 2021-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install onix-gen-funstory
pnpm add onix-gen-funstory
yarn add onix-gen-funstory
bun add onix-gen-funstory
```

## 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.1.17 |
| Published | 2021-03-29 |
| First published | 2019-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 65.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Mark Chow |
| Maintainers | markchow90 |
| Keywords | onix, funstory |

## Links

- npm: https://www.npmjs.com/package/onix-gen-funstory
- npm.io page: https://npm.io/package/onix-gen-funstory

## Dependencies (2)

- [moment](https://npm.io/package/moment.md) ^2.24.0
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.19

## Recent versions

- 0.1.17 (latest) — 2021-03-29
- 0.1.16 — 2020-10-26
- 0.1.15 — 2019-11-25
- 0.1.14 — 2019-10-15
- 0.1.13 — 2019-10-15
- 0.1.12 — 2019-10-15
- 0.1.11 — 2019-10-14
- 0.1.10 — 2019-09-27
- 0.1.9 — 2019-09-24
- 0.1.8 — 2019-09-24
- 0.1.7 — 2019-09-24
- 0.1.6 — 2019-09-20
- 0.1.5 — 2019-09-12
- 0.1.4 — 2019-08-31
- 0.1.3 — 2019-08-31
- … 3 more at https://npm.io/package/onix-gen-funstory/versions

## README

# onix-gen-funstory

a library to generate ONIX

[![npm version](https://img.shields.io/npm/v/onix-gen-funstory.svg?style=flat-square)](https://www.npmjs.com/package/onix-gen-funstory)
[![npm downloads](https://img.shields.io/npm/dm/onix-gen-funstory.svg?style=flat-square)](https://www.npmjs.com/package/onix-gen-funstory)

------

## Usage

Install the lib and add it as a dependency (recommended), run on your project dir:

```bash
yarn add onix-gen-funstory
```

## Demo Code

```javascript
import { ONIXGenerator } from 'onix-gen-funstory';

async function main(){
  const onixGenerator = new ONIXGenerator({
    senderName: 'Funstory',
    contactName: 'Mark Chow',
    emailAddress: 'email@email.com',
    cityOfPublication: 'BeiJing',
    countryOfManufacture: 'CN',
    publisherName: 'Funstory',
    websiteLink: 'https://funstory.ai',
  });
  // Generator initializing
  await onixGenerator.init();

  // ONIX Generating
  const onixResult = await onixGenerator.genONIX({
    bookName: mainBook.bookname,
    volume: volumeIndex + 1,
    author: mainBook.author,
    translator: 'Lemon Novel',//Babel Novel | Lemon Novel | Fancy Novel
    description: mainBook.desc,
    isbn: isbnNum,
    subjectCode: mainBook.subjectCode,
    price: mainBook.price,
    keywords: mainBook.keywords,
    preOrderDate: '2019-09-15',
    publicationDate: '2019-09-20',
    salesRestriction: 'ALL',//ALL TOP_FIVE KINDLE_ONLY(default)
    subTitle: 'sub Title',
    // takedown: true,
    // pageCount: 300,
  });

  console.log(onixResult)
}
```

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