Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teppeis/easta
Unicode East Asian Width data for Node.js
https://github.com/teppeis/easta
nodejs unicode
Last synced: about 2 months ago
JSON representation
Unicode East Asian Width data for Node.js
- Host: GitHub
- URL: https://github.com/teppeis/easta
- Owner: teppeis
- Created: 2017-03-07T23:39:06.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T20:03:53.000Z (7 months ago)
- Last Synced: 2024-05-29T11:03:59.721Z (7 months ago)
- Topics: nodejs, unicode
- Language: JavaScript
- Homepage: https://npm.im/easta
- Size: 945 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# easta
[Unicode East Asian Width data](http://www.unicode.org/reports/tr11/) for Node.js
[![npm version][npm-image]][npm-url]
![Node.js Version Support][node-version]
[![ci status][ci-image]][ci-url]
[![dependency status][deps-image]][deps-url]
![License][license]Based on [EastAsianWidth-15.1.0](http://www.unicode.org/Public/15.1.0/ucd/EastAsianWidth.txt).
## Usage
```js
const easta = require("easta");assert(easta("A") === "Na"); // Narrow
assert(easta("A") === "F"); // Fullwidth
assert(easta("ア") === "W"); // Wide
assert(easta("ア") === "H"); // Halfwidth
assert(easta("α") === "A"); // Ambiguous
assert(easta("À") === "N"); // Neutral
```## Changelog
- 8.0.0: update for Unicode 15.1.0, support Node v18+
- 7.0.0: update for Unicode 15.0.0, support Node v14+
- 6.0.0: update for Unicode 14.0.0, support Node v12+ and add typings for TypeScript
- 5.0.0: update for Unicode 13.0.0, support Node v10+
- 4.0.0: update for Unicode 12.1.0, support for Node v8+
- 3.0.1: reduce data size from 24KB to 13KB
- 3.0.0: update for Unicode 11.0.0, support for Node v6+
- 2.0.0: update for Unicode 10.0.0, drop Node v7
- 1.0.1: fix document
- 1.0.0: initial release (based on Unicode 9.0.0)## License
MIT License: Teppei Sato <[email protected]>
[npm-image]: https://img.shields.io/npm/v/easta.svg
[npm-url]: https://npmjs.org/package/easta
[npm-downloads-image]: https://img.shields.io/npm/dm/easta.svg
[ci-image]: https://github.com/teppeis/easta/workflows/ci/badge.svg
[ci-url]: https://github.com/teppeis/easta/actions?query=workflow%3Aci
[deps-image]: https://img.shields.io/david/teppeis/easta.svg
[deps-url]: https://david-dm.org/teppeis/easta
[node-version]: https://img.shields.io/badge/Node.js%20support-v12+-brightgreen.svg
[coverage-image]: https://img.shields.io/coveralls/teppeis/easta/master.svg
[coverage-url]: https://coveralls.io/github/teppeis/easta?branch=master
[license]: https://img.shields.io/npm/l/easta.svg