# parse-import

> Parse CSS @import statements

Latest version **2.0.0** (published 2014-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install parse-import
pnpm add parse-import
yarn add parse-import
bun add parse-import
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2014-11-26 |
| First published | 2014-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Kevin Mårtensson |
| Maintainers | kevva |
| Keywords | css, import, object, parse |

## Links

- npm: https://www.npmjs.com/package/parse-import
- Repository: https://github.com/kevva/parse-import
- Issues: https://github.com/kevva/parse-import/issues
- npm.io page: https://npm.io/package/parse-import

## Dependencies (1)

- [get-imports](https://npm.io/package/get-imports.md) ^1.0.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2014-11-26
- 1.0.0 — 2014-08-31
- 0.1.3 — 2014-06-12
- 0.1.2 — 2014-04-23
- 0.1.1 — 2014-02-24
- 0.1.0 — 2014-02-24

## README

# parse-import [![Build Status](http://img.shields.io/travis/kevva/parse-import.svg?style=flat)](https://travis-ci.org/kevva/parse-import)

> Parse CSS `@import` statements.

## Install

```sh
$ npm install --save parse-import
```

## Usage

```js
var parseImport = require('parse-import');
var str = [
	'@import url("foo.css");',
	'@import "bar.css" only screen and (min-width: 25em);'
].join(' ');

parseImport(str);

/*
[{ 
	path: 'foo.css', 
	condition: '',
	rule: '@import url("foo.css")'
}, { 
	path: 'bar.css', 
	condition: 'only screen and (min-width: 25em)',
	rule: '@import "bar.css" only screen and (min-width: 25em)'
}]
 */
```

## License

MIT © [Kevin Mårtensson](https://github.com/kevva)

---
_Source: https://npm.io/package/parse-import · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
