Sha256: bb9c5efbdb20730de8419cfa633f286213f8c3cde226139373f782c52e737e3a

Contents?: true

Size: 504 Bytes

Versions: 56

Compression:

Stored size: 504 Bytes

Contents

'use strict';

const propertyToValueAliases = require('./data/mappings.js');

const matchPropertyValue = function(property, value) {
	const aliasToValue = propertyToValueAliases.get(property);
	if (!aliasToValue) {
		throw new Error(`Unknown property \`${ property }\`.`);
	}
	const canonicalValue = aliasToValue.get(value);
	if (canonicalValue) {
		return canonicalValue;
	}
	throw new Error(
		`Unknown value \`${ value }\` for property \`${ property }\`.`
	);
};

module.exports = matchPropertyValue;

Version data entries

56 entries across 55 versions & 11 rubygems

Version Path
condenser-0.0.12 lib/condenser/processors/node_modules/unicode-match-property-value-ecmascript/index.js
condenser-0.0.11 lib/condenser/processors/node_modules/unicode-match-property-value-ecmascript/index.js
condenser-0.0.10 lib/condenser/processors/node_modules/unicode-match-property-value-ecmascript/index.js
condenser-0.0.9 lib/condenser/processors/node_modules/unicode-match-property-value-ecmascript/index.js
condenser-0.0.8 lib/condenser/processors/node_modules/unicode-match-property-value-ecmascript/index.js
learn_create-0.0.22 lib/templates/javascript_lab_template/node_modules/unicode-match-property-value-ecmascript/index.js
jester-data-8.0.0 node_modules/unicode-match-property-value-ecmascript/index.js
ezii-os-5.2.1 node_modules/unicode-match-property-value-ecmascript/index.js
ezii-os-2.0.1 node_modules/unicode-match-property-value-ecmascript/index.js
ezii-os-1.1.0 node_modules/unicode-match-property-value-ecmascript/index.js
ezii-os-1.0.0 node_modules/unicode-match-property-value-ecmascript/index.js
condenser-0.0.7 lib/condenser/processors/node_modules/unicode-match-property-value-ecmascript/index.js
ezii-os-0.0.0.1.0 node_modules/unicode-match-property-value-ecmascript/index.js
ezii-os-0.0.0.0.1 node_modules/unicode-match-property-value-ecmascript/index.js
condenser-0.0.5 lib/condenser/processors/node_modules/unicode-match-property-value-ecmascript/index.js
condenser-0.0.4 lib/condenser/processors/node_modules/unicode-match-property-value-ecmascript/index.js