mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 10:52:47 +00:00
22 lines
624 B
JavaScript
22 lines
624 B
JavaScript
var compactable = require('./compactable');
|
|
|
|
function populateComponents(properties, validator) {
|
|
for (var i = properties.length - 1; i >= 0; i--) {
|
|
var property = properties[i];
|
|
var descriptor = compactable[property.name];
|
|
|
|
if (descriptor && descriptor.shorthand) {
|
|
property.shorthand = true;
|
|
property.dirty = true;
|
|
property.components = descriptor.breakUp(property, compactable, validator);
|
|
|
|
if (property.components.length > 0)
|
|
property.multiplex = property.components[0].multiplex;
|
|
else
|
|
property.unused = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = populateComponents;
|