pax_global_header00006660000000000000000000000064141200745150014511gustar00rootroot0000000000000052 comment=f1a9e844df0d9f98adbf1f6fb9226c68cdabbf6a unicode-canonical-property-names-ecmascript-2.0.0/000077500000000000000000000000001412007451500221765ustar00rootroot00000000000000unicode-canonical-property-names-ecmascript-2.0.0/.editorconfig000066400000000000000000000003161412007451500246530ustar00rootroot00000000000000root = true [*] charset = utf-8 indent_style = tab end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true [{README.md,package.json,.travis.yml}] indent_style = space indent_size = 2 unicode-canonical-property-names-ecmascript-2.0.0/.gitattributes000066400000000000000000000000141412007451500250640ustar00rootroot00000000000000* text=auto unicode-canonical-property-names-ecmascript-2.0.0/.github/000077500000000000000000000000001412007451500235365ustar00rootroot00000000000000unicode-canonical-property-names-ecmascript-2.0.0/.github/workflows/000077500000000000000000000000001412007451500255735ustar00rootroot00000000000000unicode-canonical-property-names-ecmascript-2.0.0/.github/workflows/publish-on-tag.yml000066400000000000000000000010471412007451500311510ustar00rootroot00000000000000name: publish-on-tag on: push: tags: - '*' jobs: publish: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Install dependencies run: npm install - name: Test run: npm test - name: Publish env: NPM_TOKEN: ${{secrets.NPM_TOKEN}} run: | npm config set registry 'https://wombat-dressing-room.appspot.com/' npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}' npm publish unicode-canonical-property-names-ecmascript-2.0.0/.gitignore000066400000000000000000000003351412007451500241670ustar00rootroot00000000000000# Installed npm modules package-lock.json node_modules # Folder view configuration files .DS_Store Desktop.ini # Thumbnail cache files ._* Thumbs.db # Files that might appear on external disks .Spotlight-V100 .Trashes unicode-canonical-property-names-ecmascript-2.0.0/.travis.yml000066400000000000000000000001241412007451500243040ustar00rootroot00000000000000language: node_js node_js: - '10' - '12' script: - 'npm test' git: depth: 1 unicode-canonical-property-names-ecmascript-2.0.0/LICENSE-MIT.txt000066400000000000000000000020651412007451500244530ustar00rootroot00000000000000Copyright Mathias Bynens Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. unicode-canonical-property-names-ecmascript-2.0.0/README.md000066400000000000000000000035321412007451500234600ustar00rootroot00000000000000# unicode-canonical-property-names-ecmascript [![Build status](https://travis-ci.org/mathiasbynens/unicode-canonical-property-names-ecmascript.svg?branch=main)](https://travis-ci.org/mathiasbynens/unicode-canonical-property-names-ecmascript) [![unicode-canonical-property-names-ecmascript on npm](https://img.shields.io/npm/v/unicode-canonical-property-names-ecmascript)](https://www.npmjs.com/package/unicode-canonical-property-names-ecmascript) _unicode-canonical-property-names-ecmascript_ exports the set of canonical Unicode property names that are supported in [ECMAScript RegExp property escapes](https://github.com/tc39/proposal-regexp-unicode-property-escapes). ## Installation To use _unicode-canonical-property-names-ecmascript_, install it as a dependency via [npm](https://www.npmjs.com/): ```bash $ npm install unicode-canonical-property-names-ecmascript ``` Then, `require` it: ```js const properties = require('unicode-canonical-property-names-ecmascript'); ``` ## Example ```js properties.has('ID_Start'); // → true properties.has('IDS'); // → false ``` ## For maintainers ### How to publish a new release 1. On the `main` branch, bump the version number in `package.json`: ```sh npm version patch -m 'Release v%s' ``` Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). Note that this produces a Git commit + tag. 1. Push the release commit and tag: ```sh git push && git push --tags ``` Our CI then automatically publishes the new release to npm. ## Author | [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | |---| | [Mathias Bynens](https://mathiasbynens.be/) | ## License _unicode-canonical-property-names-ecmascript_ is available under the [MIT](https://mths.be/mit) license. unicode-canonical-property-names-ecmascript-2.0.0/index.js000077500000000000000000000021771412007451500236550ustar00rootroot00000000000000module.exports = new Set([ // Non-binary properties: 'General_Category', 'Script', 'Script_Extensions', // Binary properties: 'Alphabetic', 'Any', 'ASCII', 'ASCII_Hex_Digit', 'Assigned', 'Bidi_Control', 'Bidi_Mirrored', 'Case_Ignorable', 'Cased', 'Changes_When_Casefolded', 'Changes_When_Casemapped', 'Changes_When_Lowercased', 'Changes_When_NFKC_Casefolded', 'Changes_When_Titlecased', 'Changes_When_Uppercased', 'Dash', 'Default_Ignorable_Code_Point', 'Deprecated', 'Diacritic', 'Emoji', 'Emoji_Component', 'Emoji_Modifier', 'Emoji_Modifier_Base', 'Emoji_Presentation', 'Extended_Pictographic', 'Extender', 'Grapheme_Base', 'Grapheme_Extend', 'Hex_Digit', 'ID_Continue', 'ID_Start', 'Ideographic', 'IDS_Binary_Operator', 'IDS_Trinary_Operator', 'Join_Control', 'Logical_Order_Exception', 'Lowercase', 'Math', 'Noncharacter_Code_Point', 'Pattern_Syntax', 'Pattern_White_Space', 'Quotation_Mark', 'Radical', 'Regional_Indicator', 'Sentence_Terminal', 'Soft_Dotted', 'Terminal_Punctuation', 'Unified_Ideograph', 'Uppercase', 'Variation_Selector', 'White_Space', 'XID_Continue', 'XID_Start' ]); unicode-canonical-property-names-ecmascript-2.0.0/package.json000066400000000000000000000016071412007451500244700ustar00rootroot00000000000000{ "name": "unicode-canonical-property-names-ecmascript", "version": "2.0.0", "description": "The set of canonical Unicode property names supported in ECMAScript RegExp property escapes.", "homepage": "https://github.com/mathiasbynens/unicode-canonical-property-names-ecmascript", "main": "index.js", "engines": { "node": ">=4" }, "files": [ "LICENSE-MIT.txt", "index.js" ], "keywords": [ "unicode", "unicode properties" ], "license": "MIT", "author": { "name": "Mathias Bynens", "url": "https://mathiasbynens.be/" }, "repository": { "type": "git", "url": "https://github.com/mathiasbynens/unicode-canonical-property-names-ecmascript.git" }, "bugs": "https://github.com/mathiasbynens/unicode-canonical-property-names-ecmascript/issues", "devDependencies": { "ava": "*" }, "scripts": { "test": "ava tests/tests.js" } } unicode-canonical-property-names-ecmascript-2.0.0/tests/000077500000000000000000000000001412007451500233405ustar00rootroot00000000000000unicode-canonical-property-names-ecmascript-2.0.0/tests/tests.js000066400000000000000000000020231412007451500250350ustar00rootroot00000000000000const test = require('ava'); const canonicalProperties = require('../index.js'); test('unicode-canonical-property-names-ecmascript', t => { // Test non-binary properties. t.true(canonicalProperties.has('General_Category')); t.false(canonicalProperties.has('gc')); t.true(canonicalProperties.has('Script')); t.false(canonicalProperties.has('sc')); t.true(canonicalProperties.has('Script_Extensions')); t.false(canonicalProperties.has('scx')); // Test binary properties. t.true(canonicalProperties.has('ASCII')); t.false(canonicalProperties.has('ascii')); t.true(canonicalProperties.has('Any')); t.false(canonicalProperties.has('any')); t.true(canonicalProperties.has('Assigned')); t.false(canonicalProperties.has('assigned')); t.true(canonicalProperties.has('ID_Start')); t.false(canonicalProperties.has('IDS')); t.true(canonicalProperties.has('Emoji_Modifier')); t.false(canonicalProperties.has('emojimodifier')); t.true(canonicalProperties.has('Emoji_Component')); t.false(canonicalProperties.has('emojicomponent')); });