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