0.3.0 • Published 13 days ago

eastasianwidth v0.3.0

Weekly downloads
199,991
License
MIT
Repository
github
Last release
13 days ago

East Asian Width

Get East Asian Width from a character.

'F'(Fullwidth), 'H'(Halfwidth), 'W'(Wide), 'Na'(Narrow), 'A'(Ambiguous) or 'N'(Natural).

Original Code is 東アジアの文字幅 (East Asian Width) の判定 - 中途.

Install

$ npm install eastasianwidth

Usage

var eaw = require('eastasianwidth');
console.log(eaw.eastAsianWidth('₩')) // 'F'
console.log(eaw.eastAsianWidth('。')) // 'H'
console.log(eaw.eastAsianWidth('뀀')) // 'W'
console.log(eaw.eastAsianWidth('a')) // 'Na'
console.log(eaw.eastAsianWidth('①')) // 'A'
console.log(eaw.eastAsianWidth('ف')) // 'N'

console.log(eaw.characterLength('₩')) // 2
console.log(eaw.characterLength('。')) // 1
console.log(eaw.characterLength('뀀')) // 2
console.log(eaw.characterLength('a')) // 1
console.log(eaw.characterLength('①')) // 2
console.log(eaw.characterLength('ف')) // 1

console.log(eaw.length('あいうえお')) // 10
console.log(eaw.length('abcdefg')) // 7
console.log(eaw.length('¢₩。ᅵㄅ뀀¢⟭a⊙①بف')) // 19
easy-select-rnreact-native-shekhar-bridge-testdyx-reacttalent-to-vite-cli@oiti/documentoscopy-react-nativequoc-testluminos-ui-core@everything-registry/sub-chunk-1545jawwy-sdkjawwy_gamification_release@314oner_npm/universal-components-libraryreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-tablemachinebeemrcapsrcf-tea-testnetreact-native-jawwy_sample@arb-protocol/tui@albawid/albawidapp5758-tea-ibc@anonybit-modules/videoreconstruction@cetiak/cetiak@cdk8s-extensions/argo-rollout@chi_eee/another-test-package@chemzqm/string-width@bigwin5758/5758-tea-ibc@bismilah15/kintilidin15@blusalt-sdk/react-native-blusalt-document-verification@blazinaj/app-kit@beccablaster7/emin@brantalikp/rn-resize@aysea/react-native-ui-library@azalpacir/react-native-dhp-printer@ayi0910/tahu-bulat@asmamirza/calculator-cli1@baghoez/djarum12@con-test/react-native-concent-common@cs6/react-native-test-native-view-library@cybermega/flutter-resource-manager-rs@davidrockefeller/pixelpioneer@dachico/timescript@daiki48/keisan@damruravihara/react-native-testing-package@danitama/rusfer@dayatukir/swaptea@dimcheify/dimui@digitalrakesh/jsui@epeixoto85/module-pv@enirisdev/angular-google-charts@extrieve_technologies/quickcapture_react_native@girhan/moko@hieuquang2212/form@haysquare/svelte-multiselect@haysquare/svelte-multi-select@hdkhoa1302/app-themes@firstday/firstdayteh@frontsail/cli@juanaraneta/dept-central-lib-client@jfilipe-sparta/react-native-module_2@jockho-gus/jp-geden@itayn-fireberry-org/itayn-test@lehuyaa/my-assetspnm-yph-react-native-custom-componentsgerimismalamseningentogeulis94gh-monoproject-clipucuk5000ginminegeorgeanons12georgejohnfelix29projekudingenz-native-elementsquickcapture_react_nativegogencygogency-test-2grtaudahra-atm-machineglobal_components_assignmentgriffin-ui-librarypizza-teapolosgamification-integration-newgaskeunnnmamangpolyglot-component-librarypopoqgaskeunlahcuy20pileuleuyanteafranklampard45framework_test_library_sixdeeframework_test_library_sixdee_newframework_test_library_sixdee_new_newpixelpioneergalangpramono253galihariwanda29prastianhdgaurav-react-native-loop
0.3.0

13 days ago

0.2.0

6 years ago

0.1.1

9 years ago

0.1.0

11 years ago

0.0.1

11 years ago