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_release@314oner_npm/universal-components-libraryreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgondp149-tablesklif-uireact-native-jawwy_sample@baurine/regexpu-core@aristidenf/streak-counterant-design-draggable-modal-4ant-design-draggable-modal-fixant-design-draggable-modal-fix-2gzup-react-image-file-resizer@apardellass/react-native-audio-stream@assystant/firebase@assystant/grid-component@assystant/permissionshello_test_my_webpack@anonybit-modules/videoreconstruction@zh0st/evm-chains@zhangchongzhi/webpack@_nomtek/react-native-shimmer-animationgitbook-plugin-toc-xiayuact_mvvm_shop_cartagent-get-agentgoogle-remake@affinidi/affinidi-auth-sdk-kernel@ali5049/react-native-buttons@adembacaj/react-native-google-payajs2-new@amirdiafi/react-native-ios-hapticsalisselisss-lab3@torswap/tor-token-lists@sephriot/react-native-persistable-uri@shivarajapple/first-library@sidghimire/react-native-mapbox-navigation@seculum/vue-dev-clone@seamlessc/tabler-icons-react@seitk/mongoose-paginate-v2express-jwt-authenticator@routebuddies/react-native-mapbox-navigation@skeetboothppq/component-library@skedulr/nebula-ui-library@trackier/react-native-trackier@traitsniper/web3-react-connector@traitsniper/web3-react-v6-connectorfmslfn-lib-example@taingo97/react-native-key-rsa
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

7 years ago

1.0.0

7 years ago