wishthis/node_modules/import-regex
2022-04-08 12:55:35 +02:00
..
index.js Add production dependencies 2022-01-21 09:28:41 +01:00
LICENSE.md Add production dependencies 2022-01-21 09:28:41 +01:00
package.json Install yarn 2022-04-08 12:55:35 +02:00
README.md Add production dependencies 2022-01-21 09:28:41 +01:00

import-regex Build Status

Regular expression for matching CSS @imports

Install

$ npm install --save import-regex

Usage

var importRegex = require('import-regex');

importRegex().test('@import url(\'foo.css\'); foo bar');
//=> true

importRegex({ exact: true }).test('@import url(\'foo.css\'); foo bar');
//=> false

importRegex({ exact: true }).test('@import url(\'foo.css\');');
//=> true

'foo @import url(\'foo.css\'); bar @import url(\'bar.css\');'.match(importRegex());
//=> ['@import url('foo.css');', '@import url('bar.css');']

License

MIT © Kevin Mårtensson