# css-claw

> A tool to claw CSS and JavaScript links on html file

Latest version **1.0.5** (published 2015-08-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install css-claw
pnpm add css-claw
yarn add css-claw
bun add css-claw
```

## 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 | 1.0.5 |
| Published | 2015-08-27 |
| First published | 2015-08-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | lchen |
| Maintainers | lchen |
| Keywords | css, javascript, claw |

## Links

- npm: https://www.npmjs.com/package/css-claw
- Repository: https://github.com/oodzchen/css-claw
- Issues: https://github.com/oodzchen/css-claw/issues
- npm.io page: https://npm.io/package/css-claw

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2015-08-27
- 1.0.4 — 2015-08-26
- 1.0.3 — 2015-08-26
- 1.0.2 — 2015-08-26
- 1.0.1 — 2015-08-26
- 1.0.0 — 2015-08-26

## README

# css-claw
A tool to get all CSS and JavaScript file's url on the html page.

## Installation
	$ npm install css-claw
	

## Usage
```javascript
var cssClaw = require('css-claw');

cssClaw.getPaths('./index.html', {ecoding: 'utf8'}, function(data){
  console.log(data);
});
```

## API
### cssClaw.getPaths(htmlPath, [options], callback)

`htmlPath` String

`options` Object

- **cssReg** Object regular expression to match all relative url of CSS in the html
- **jsReg** Object regular expression to match all relative url of JavaScript in the html
- **encoding** String default = 'utf8'

`callback`: Function

```javascript
var options = {
  cssReg: /<link[^>]*href=["'](.*\.css)["'][^>]*>/g,
  jsReg: /<script[^>]*src=["'](.*\.js)["'][^>]*>/g,
  encoding: 'utf8'
};

var callback = function(data){
  console.log(data);
  // do something ...
};

cssClaw.getPaths('./index.html', options, callback);

```

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