# is-css-request

> Utils for checking if a path or url points to a CSS request.

Latest version **1.0.1** (published 2024-06-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-css-request
pnpm add is-css-request
yarn add is-css-request
bun add is-css-request
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2024-06-23 |
| First published | 2024-06-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | SonOfMagic |
| Keywords | css, request, is-css, vite, rollup, webpack, esbuild |

## Links

- npm: https://www.npmjs.com/package/is-css-request
- Repository: https://github.com/sonofmagic/is-css-request
- Homepage: https://github.com/sonofmagic/is-css-request#readme
- Issues: https://github.com/sonofmagic/is-css-request/issues
- npm.io page: https://npm.io/package/is-css-request

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2024-06-23
- 1.0.0 — 2024-06-22

## README

# is-css-request

Utils for checking if a path or url points to a CSS request.

## Installation

```bash
npm i is-css-request

yarn add is-css-request

pnpm add is-css-request
```

## Usage

### API

```js
// esm + ts
import { isCSSRequest, isModuleCSSRequest } from 'is-css-request'
// or cjs
// const { isCSSRequest, isModuleCSSRequest } = require('is-css-request')

isCSSRequest('http://foo.bar/css-file.css') // => true
isCSSRequest('some/path/to/a/css-file.css') // => true
isCSSRequest('ice/a/preprocessor.scss') // => true
isCSSRequest('ice/a/x.fac') // => false

isModuleCSSRequest('some/path/to/a/css-file.css') // => false
isModuleCSSRequest('some/path/to/a/css-file.module.css') // => true
```

### Enum

```ts
import { PostCssDialectLang, PreprocessLang, PureCssLang } from 'is-css-request'

PureCssLang.css
PreprocessLang.less
PreprocessLang.sass
PreprocessLang.scss
PostCssDialectLang.sss
```

## License

[MIT](./LICENSE)

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b feature/my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin feature/my-new-feature`)
5. Create new Pull Request

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