import-regex
Regular expression for matching CSS @imports
Last updated 10 years ago by kevva .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install import-regex 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.1.0                                ...           latest (10 years ago)

3 Versions

  • 1.1.0                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE