lib/quantity.js
function createUnitRegex(units) {
    return Object.keys(units)
        .sort((a, b) => b.length - a.length)
        .map(unit => unit.length > 2 ? caseInsensitivePart(unit) : unit)
        .join('|');
}
function createUnitRegex(units) {
    return Object.keys(units)
        .sort((a, b) => b.length - a.length)
        .map(unit => unit.length > 2 ? caseInsensitivePart(unit) : unit)
        .join('|');
}
function createUnitRegex ( units ) { return Object . keys ( units ) . sort ( ( a , b ) => b . length - a . length ) . map ( unit => unit . length > 2 ? caseInsensitivePart ( unit ) : unit ) . join ( '|' ) ; }
Create a regex for the given associative object.
Create a regex for the given associative object .