1.0.8 • Published 6 years ago

@kkitahara/unicode-tools v1.0.8

Weekly downloads
-
License
Apache-2.0
Repository
gitlab
Last release
6 years ago

JavaScript Style Guide license version bundle size downloads per week downloads per month downloads per year downloads total

UnicodeTools

ECMAScript modules which implement some of the Unicode® Standard.

Currently, only the default/canonical case folding (the Unicode® Standard 12.0.0, section 3.13, R4/D145) is implemented.

New functionalities may be added on (author's) demand in future.

Installation

npm install @kkitahara/unicode-tools

Examples

import { toCaseFold } from '@kkitahara/unicode-tools'

'\u{00c5}' === '\u{00e5}' // false
toCaseFold('\u{00c5}') === '\u{00e5}' // true

'\u{0041}\u{030a}' === '\u{0061}\u{030a}' // false
toCaseFold('\u{0041}\u{030a}') === '\u{0061}\u{030a}' // true

// return the input value if it is not a string
toCaseFold(null) // null
toCaseFold(false) // false
import { toCanonicalCaseFold } from '@kkitahara/unicode-tools'

'\u{00c5}' === '\u{00e5}' // false
toCanonicalCaseFold('\u{00c5}') === '\u{00e5}' // false
toCanonicalCaseFold('\u{00c5}') === '\u{0061}\u{030a}' // true

'\u{0041}\u{030a}' === '\u{0061}\u{030a}' // false
toCanonicalCaseFold('\u{0041}\u{030a}') === '\u{0061}\u{030a}' // true

// return the input value if it is not a string
toCanonicalCaseFold(null) // null
toCanonicalCaseFold(false) // false

NOTICE

This software uses data extracted from the Unicode® Character Database.

See NOTICE and the Unicode Data Files and Software License for more details.

Unicode is a registered trademark of Unicode, Inc. in the United States and other countries.

LICENSE

© 2019 Koichi Kitahara
Apache 2.0

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago