From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- node_modules/unicode-match-property-ecmascript/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 node_modules/unicode-match-property-ecmascript/index.js (limited to 'node_modules/unicode-match-property-ecmascript/index.js') diff --git a/node_modules/unicode-match-property-ecmascript/index.js b/node_modules/unicode-match-property-ecmascript/index.js new file mode 100755 index 00000000..65205934 --- /dev/null +++ b/node_modules/unicode-match-property-ecmascript/index.js @@ -0,0 +1,16 @@ +'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; -- cgit v1.2.3