You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
401 B
JavaScript

5 years ago
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;