Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
UCD - Unicode Character Database for JavaScript
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
data
spec Support for surrogate pairs.
src
tool
unicode/6.2.0/ucd
.gitignore
MIT-LICENSE.txt
README.md
package.json
ucd-0.2.0.js
ucd-0.2.0.min.js

README.md

UCD - Unicode Character Database for JavaScript

UCD offers a series of functions that provide a simple interface to the Unicode Character Database.

Supported Platforms

  • Node.js
  • Modern Web Browsers

Install to Node.js

npm install ucd

How to load a UCD module

Node.js

// load UCD
var UCD = require('ucd');

Web Browser

<!-- laod UCD -->
<script type="text/javascript" src="ucd-0.2.0.js"></script>

Usage

Get Unicode Name

.getName() method returns a Unicode Name of character given as argument.

UCD.getName('@'); // "COMMERCIAL AT"
UCD.getName('2'); // "DIGIT TWO"
UCD.getName('L'); // "LATIN CAPITAL LETTER L"
UCD.getName('m'); // "LATIN SMALL LETTER M"
UCD.getName('ü'); // "LATIN SMALL LETTER U WITH DIAERESIS"
UCD.getName(''); // "LATIN SMALL LIGATURE LONG S T"
UCD.getName('ق'); // "ARABIC LETTER QAF"
UCD.getName(''); // "HEBREW LETTER TAV WITH DAGESH"
UCD.getName(''); // "HIRAGANA LETTER A"
UCD.getName(''); // "HIRAGANA LETTER KA"
UCD.getName(''); // "KATAKANA LETTER YO"
UCD.getName(''); // "FULLWIDTH RIGHT PARENTHESIS"
UCD.getName(''); // "CJK UNIFIED IDEOGRAPH-6F22"
UCD.getName(''); // "KANGXI RADICAL TOOTH"
UCD.getName(''); // "PARENTHESIZED IDEOGRAPH FESTIVAL"
UCD.getName(''); // "BIOHAZARD SIGN"

License

Released under the MIT license.

Copyright (c) 2013 ynakajima

Something went wrong with that request. Please try again.