split-graphemes
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -9,2 +9,4 @@ "use strict"; | ||
var _japaneseKana = require("./japanese-kana"); | ||
var _kannada = require("./kannada"); | ||
@@ -30,3 +32,3 @@ | ||
var patterns = [_emoji.countryFlag, _emoji.keyCap, _emoji.emojiVariation, _bengali.bengali, _devanagari.devanagari, _gujarati.gujarati, _kannada.kannada, _khmer.khmer, _lao.lao, _malayalam.malayalam, _myanmar.myanmar, _tamil.tamil, _telugu.telugu, _thai.thai, _tibetan.tibetan, '.']; | ||
var patterns = [_emoji.countryFlag, _emoji.keyCap, _emoji.emojiVariation, _bengali.bengali, _devanagari.devanagari, _gujarati.gujarati, _japaneseKana.japaneseKana, _kannada.kannada, _khmer.khmer, _lao.lao, _malayalam.malayalam, _myanmar.myanmar, _tamil.tamil, _telugu.telugu, _thai.thai, _tibetan.tibetan, '.']; | ||
var splitter = new RegExp("(".concat(patterns.join('|'), ")"), 'gu'); | ||
@@ -33,0 +35,0 @@ |
{ | ||
"name": "split-graphemes", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Divide the string into graphemes.", | ||
@@ -25,2 +25,3 @@ "main": "lib/index.js", | ||
"gujarati", | ||
"japanese", | ||
"kannada", | ||
@@ -31,2 +32,3 @@ "khmer", | ||
"myanmar", | ||
"NFD", | ||
"tamil", | ||
@@ -33,0 +35,0 @@ "telugu", |
@@ -36,5 +36,6 @@ # split-graphemes | ||
### Japanese | ||
### Japanese NFD | ||
```js | ||
splitGraphemes('こんにちは') // ['こ', 'ん', 'に', 'ち', 'は'] | ||
splitGraphemes('ごん゙に゙ぢば') // ['ご', 'ん゙', 'に゙', 'ぢ', 'ば'] | ||
splitGraphemes('パピプペポ') // ['パ', 'ピ', 'プ', 'ペ', 'ポ'] | ||
``` | ||
@@ -53,2 +54,3 @@ | ||
- [Gujarati](https://www.unicode.org/charts/PDF/U0A80.pdf) | ||
- [Japanese Hiragana](https://www.unicode.org/charts/PDF/U3040.pdf) and [Katakana](https://www.unicode.org/charts/PDF/U30A0.pdf) NFD | ||
- [Kannada](https://www.unicode.org/charts/PDF/U0C80.pdf) | ||
@@ -55,0 +57,0 @@ - [Khmer](https://www.unicode.org/charts/PDF/U1780.pdf) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11935
17
177
65