4.1.2 • Published 1 year ago
fetch-css v4.1.2
fetch-css
Extract CSS from websites and browser extensions
Usage
npm i fetch-css
import fetchCss from "fetch-css";
// retrieve CSS of a website
const [{css}] = await fetchCss([{url: "https://example.com"}]);
// extract CSS from a Chrome extension
const [{css}] = await fetchCss([{crx: "hlepfoohegkhhmjieoechaddaejaokhf"}]);
API
fetchCss(sources)
sources
: Array Array of source objectssource
: Objecturl
: string or Array An absolute URL pointing to either a website or directly to a CSS or JS file (to extract inlined CSS strings from)fetchOpts
: Object Options passed to fetchcrx
: string A Chrome extension idcontentScriptsOnly
: boolean Whether to pull only content scripts from a extension. Default:false
strict
: boolean Whether to throw an error if fetch fails. Default:false
Returns a Promise
that resolves to a sources
array with additional css
properties present on each source.
Related
- remap-css - Remap CSS rules based on declaration value
© silverwind, distributed under BSD licence
4.1.2
1 year ago
4.1.0
2 years ago
4.1.1
2 years ago
4.0.12
2 years ago
4.0.13
2 years ago
4.0.9
2 years ago
4.0.10
2 years ago
4.0.11
2 years ago
4.0.8
3 years ago
4.0.5
3 years ago
4.0.4
3 years ago
4.0.7
3 years ago
4.0.6
3 years ago
4.0.1
3 years ago
4.0.0
3 years ago
4.0.3
3 years ago
4.0.2
3 years ago
3.1.12
4 years ago
3.1.11
4 years ago
3.1.10
4 years ago
3.1.9
4 years ago
3.1.7
4 years ago
3.1.8
4 years ago
3.1.6
5 years ago
3.1.5
5 years ago
3.1.4
5 years ago
3.1.3
5 years ago
3.1.2
5 years ago
3.1.1
5 years ago
3.1.0
5 years ago
3.0.3
5 years ago
3.0.2
5 years ago
3.0.1
5 years ago
3.0.0
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago