# kyujitai

> Utility collections for making Japanese text old-fashioned.

Latest version **1.3.0** (published 2020-08-30) · MIT license · 0 weekly downloads

## Install

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

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2020-08-30 |
| First published | 2014-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/kyujitai) |
| Module format | CommonJS |
| Node | >= 4 |
| Dependencies | 1 |
| Unpacked size | 63.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | hakatashi |
| Maintainers | hakatashi |
| Keywords | kyujitai, japanese, text, kanji, Unicode, IVS, conversion |

## Links

- npm: https://www.npmjs.com/package/kyujitai
- Repository: https://github.com/hakatashi/kyujitai.js
- Issues: https://github.com/hakatashi/kyujitai.js/issues
- npm.io page: https://npm.io/package/kyujitai

## Dependencies (1)

- [ivs](https://npm.io/package/ivs.md) ^2.0.2

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.3.0 (latest) — 2020-08-30
- 1.2.0 — 2020-01-27
- 1.1.0 — 2017-09-05
- 1.0.0 — 2016-01-02
- 0.2.1 — 2014-09-21
- 0.2.0 — 2014-09-19
- 0.1.0 — 2014-09-07
- 0.0.1 — 2014-09-06

## README

# kyujitai.js

[![Build Status](https://travis-ci.org/hakatashi/kyujitai.js.svg)](https://travis-ci.org/hakatashi/kyujitai.js)
[![Greenkeeper badge](https://badges.greenkeeper.io/hakatashi/kyujitai.js.svg)](https://greenkeeper.io/)

Utility collections for making Japanese text old-fashioned.

## install

    npm install kyujitai

## Use

```javascript
const Kyujitai = require('kyujitai');
const kyujitai = new Kyujitai((error) => {
    kyujitai.encode('旧字体'); //=> '舊字體'
});
```

## Usage

### new Kyujitai([options], [callback])

Constructor.

* `options`: [Object]
* `callback`: [Function(error)] Called when construction completed.
  - `error`: [Error] Supplied if construction failed.

### kyujitai.encode(string, [options])

Encode string from shinjitai to kyujitai.

* `string`: [String] Input string
* `options`: [Object]
  - `options.IVD`: [Boolean] `true` if you want to allow IVS for the encoded string. Default is false.
* Returns: [String] Output string

```javascript
kyujitai.encode('旧字体'); //=> '舊字體'

kyujitai.encode('画期的図画'); //=> '劃期的圖畫'

kyujitai.encode('弁明'); //=> '辯明'
kyujitai.encode('弁償'); //=> '辨償'
kyujitai.encode('花弁'); //=> '花瓣'
kyujitai.encode('弁髪'); //=> '辮髮'
```

### kyujitai.decode(string, [options])

Decode string from kyujitai to shinjitai.

* `string`: [String] Input string
* `options`: [Object]
* Returns: [String] Output string

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