atlas-guide
Version:
Atlas is living style-guides & pattern library static site generator with extensive CSS monitoring and components info that could be used virtually with any scss/css project
23 lines (16 loc) • 476 B
JavaScript
;
const _uniq = require('lodash.uniq');
function parseSpaces(spacesArray) {
if (!spacesArray) {
return false;
}
let allMargins = [];
spacesArray.forEach(declarationVal => {
if (/calc/ig.test(declarationVal)) {
return allMargins.push(declarationVal);
}
declarationVal.trim().split(/\s/).forEach(value => allMargins.push(value));
});
return _uniq(allMargins);
}
module.exports = parseSpaces;