diff options
Diffstat (limited to 'node_modules/unicode-match-property-ecmascript')
4 files changed, 0 insertions, 144 deletions
diff --git a/node_modules/unicode-match-property-ecmascript/LICENSE-MIT.txt b/node_modules/unicode-match-property-ecmascript/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/node_modules/unicode-match-property-ecmascript/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens <https://mathiasbynens.be/> - -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. diff --git a/node_modules/unicode-match-property-ecmascript/README.md b/node_modules/unicode-match-property-ecmascript/README.md deleted file mode 100644 index 4b1c2b8d..00000000 --- a/node_modules/unicode-match-property-ecmascript/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# unicode-match-property-ecmascript [](https://travis-ci.org/mathiasbynens/unicode-match-property-ecmascript) [](https://www.npmjs.com/package/unicode-match-property-ecmascript) - -_unicode-match-property-ecmascript_ matches a given Unicode property or [property alias](https://github.com/mathiasbynens/unicode-property-aliases-ecmascript) to its canonical property name without applying [loose matching](https://github.com/mathiasbynens/unicode-loose-match) per the algorithm used for [RegExp Unicode property escapes in ECMAScript](https://github.com/tc39/proposal-regexp-unicode-property-escapes). Consider it a strict alternative to loose matching. - -## Installation - -To use _unicode-match-property-ecmascript_ programmatically, install it as a dependency via [npm](https://www.npmjs.com/): - -```bash -$ npm install unicode-match-property-ecmascript -``` - -Then, `require` it: - -```js -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. - -```js -// 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`: - - ```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 - -| [](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -_unicode-match-property-ecmascript_ is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/unicode-match-property-ecmascript/index.js b/node_modules/unicode-match-property-ecmascript/index.js deleted file mode 100755 index 65205934..00000000 --- a/node_modules/unicode-match-property-ecmascript/index.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const canonicalProperties = require('unicode-canonical-property-names-ecmascript'); -const propertyAliases = require('unicode-property-aliases-ecmascript'); - -const matchProperty = function(property) { - if (canonicalProperties.has(property)) { - return property; - } - if (propertyAliases.has(property)) { - return propertyAliases.get(property); - } - throw new Error(`Unknown property: ${ property }`); -}; - -module.exports = matchProperty; diff --git a/node_modules/unicode-match-property-ecmascript/package.json b/node_modules/unicode-match-property-ecmascript/package.json deleted file mode 100644 index fc23d8d0..00000000 --- a/node_modules/unicode-match-property-ecmascript/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "unicode-match-property-ecmascript", - "version": "2.0.0", - "description": "Match a Unicode property or property alias to its canonical property name per the algorithm used for RegExp Unicode property escapes in ECMAScript.", - "homepage": "https://github.com/mathiasbynens/unicode-match-property-ecmascript", - "main": "index.js", - "engines": { - "node": ">=4" - }, - "files": [ - "LICENSE-MIT.txt", - "index.js" - ], - "keywords": [ - "unicode", - "unicode properties", - "unicode property aliases" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/unicode-match-property-ecmascript.git" - }, - "bugs": "https://github.com/mathiasbynens/unicode-match-property-ecmascript/issues", - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "devDependencies": { - "ava": "*" - }, - "scripts": { - "test": "ava ./tests/*" - } -} |
