2.0.0 • Published 3 years ago

unicode-match-property-ecmascript v2.0.0

Weekly downloads
11,136,766
License
MIT
Repository
github
Last release
3 years ago

unicode-match-property-ecmascript Build status unicode-match-property-ecmascript on npm

unicode-match-property-ecmascript matches a given Unicode property or property alias to its canonical property name without applying loose matching per the algorithm used for RegExp Unicode property escapes in ECMAScript. Consider it a strict alternative to loose matching.

Installation

To use unicode-match-property-ecmascript programmatically, install it as a dependency via npm:

$ npm install unicode-match-property-ecmascript

Then, require it:

const matchProperty = require('unicode-match-property-ecmascript');

API

This module exports a single function named matchProperty.

matchProperty(value)

This function takes a string value and attempts to match it to a canonical Unicode property name. If there’s a match, it returns the canonical property name. Otherwise, it throws an exception.

// Find the canonical property name:
matchProperty('sc')
// → 'Script'

matchProperty('Script')
// → 'Script'

matchProperty('script') // Note: incorrect casing.
// → throws

For maintainers

How to publish a new release

  1. On the main branch, bump the version number in package.json:

    npm version patch -m 'Release v%s'

    Instead of patch, use minor or major as needed.

    Note that this produces a Git commit + tag.

  2. Push the release commit and tag:

    git push && git push --tags

    Our CI then automatically publishes the new release to npm.

Author

twitter/mathias
Mathias Bynens

License

unicode-match-property-ecmascript is available under the MIT license.

regexpu-corearchetype-library@dinert/utilseasy-select-rnvuedragdropuploadimagesreact-native-bluetooth2killi8n-react-native-fast-imagern-send-sms@cashremit/cr-streamline-iconsreact-native-template-rfbasecloud-archive-s3airscanairscan-examplebb-chatreact-native-esc-pos-sahaab@ihikmawan/tailwindcss-multi-theme-l2@borisovart/atol-kkt-moduledeneme323112@texttree/demo-bsa-reference-rcl@ntt_app/react-native-custom-notificationreact-native-custom-text-hwjamesreact-native-covid-sdkgql_din_modreact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-library@l1nyanm1ng/react-picture-viewer@saeon/ol-react@saeon/quick-form@olivervorasai/sliderreact-native-printer-brothersrn-pdf-reader-offlinecbmis-ai-toolboxreact-native-shekhar-bridge-testasterjscogoportutilswilscanner@oiti/documentoscopy-react-nativequoc-testreact-native-slider-kf@saaspe/componentshyperpass-sdkexpand-react-bridgeopea-bootstraapluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-3012jawwy-sdkjawwy_gamification_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgondp149-tablesklif-uireact-native-jawwy_samplegriffin-ui-librarycomposize@wacoco/ytaman-baca-masyarakattale-wallet-plugintalenewsyiedtalenewvanillajstest-library-123test-haptik-libtest-npm-jjmessiwhitegarddenvue-button-test1webchewebdesa-laravel-final-releasewoven-challenge-deploywifi_configuration_packagern-tm-notifyrn-use-modal-hookrn-currency-formatterrn-counter-demorn-session-multiplier-demorn_unique_device_idrnttlockshainasharingcomponent2shift-regexp-acceptorshirin-common-packageschema-page-loaderreqioxresponsis-gantt-task-reactresponsive-react-appreactnativelyreactofy-css-libraryreact-voice-actionsrn-check-btnrn-circular-chartrn-horizontal-listreact_native_pandey_marqueern-adyen-dropinrn-keyboard-avoiding-viewrn-my-libraryrn-pay-sdkteapackage-tatespoorman297
2.0.0

3 years ago

1.0.4

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago