%PDF- %PDF-
Direktori : /home/medipszd/www/bower_components/moment/src/lib/units/ |
Current File : //home/medipszd/www/bower_components/moment/src/lib/units/priorities.js |
var priorities = {}; export function addUnitPriority(unit, priority) { priorities[unit] = priority; } export function getPrioritizedUnits(unitsObj) { var units = []; for (var u in unitsObj) { units.push({unit: u, priority: priorities[u]}); } units.sort(function (a, b) { return a.priority - b.priority; }); return units; }