--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
23
node_modules/get-imports/index.js
generated
vendored
Normal file
23
node_modules/get-imports/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
var arrayUniq = require('array-uniq');
|
||||
var importRegex = require('import-regex');
|
||||
|
||||
/**
|
||||
* Get CSS @imports from a string
|
||||
*
|
||||
* @param {String} str
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports = function (str) {
|
||||
var imports = str.match(importRegex());
|
||||
|
||||
if (!imports) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return arrayUniq(imports.map(function (el) {
|
||||
return el.trim();
|
||||
}));
|
||||
};
|
||||
Loading…
Reference in a new issue