Last change
on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
449 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | const canonicalProperties = require('unicode-canonical-property-names-ecmascript');
|
---|
4 | const propertyAliases = require('unicode-property-aliases-ecmascript');
|
---|
5 |
|
---|
6 | const matchProperty = function(property) {
|
---|
7 | if (canonicalProperties.has(property)) {
|
---|
8 | return property;
|
---|
9 | }
|
---|
10 | if (propertyAliases.has(property)) {
|
---|
11 | return propertyAliases.get(property);
|
---|
12 | }
|
---|
13 | throw new Error(`Unknown property: ${ property }`);
|
---|
14 | };
|
---|
15 |
|
---|
16 | module.exports = matchProperty;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.