pixsy/node_modules/clean-css/lib/tokenizer/extract-selectors.js

18 lines
401 B
JavaScript
Raw Normal View History

2017-12-22 17:22:08 +00:00
var split = require('../utils/split');
function extractSelectors(string, context) {
var list = [];
var metadata;
var selectors = split(string, ',');
for (var i = 0, l = selectors.length; i < l; i++) {
metadata = context.track(selectors[i], true, i);
context.track(',');
list.push([selectors[i].trim()].concat(metadata));
}
return list;
}
module.exports = extractSelectors;