Andrea Gaertner 668e16c315 Einkaufsliste application_liste hinzugefügt | 4 years ago | |
---|---|---|
.. | ||
LICENSE | 4 years ago | |
README.md | 4 years ago | |
index.js | 4 years ago | |
package.json | 4 years ago |
Get a list of stylesheets from an HTML document.
Install with npm
npm install --save list-stylesheets
var getStylesheetList = require('list-stylesheets');
var data = getStylesheetList(html, options);
console.log(data.html);
console.log(data.hrefs);
Type: Boolean
Default: true
Whether to resolve <link rel="stylesheet">
tags and inline the resulting styles.
Type: Boolean
Default: true
Whether to remove the original <link rel="stylesheet">
tags after (possibly) inlining the css from them.
Type: Object
Default: { EJS: { start: '<%', end: '%>' }, HBS: { start: '{{', end: '}}' } }
An object where each value has a start
and end
to specify fenced code blocks that should be ignored during parsing. For example, Handlebars (hbs) templates are HBS: {start: '{{', end: '}}'}
. Note that codeBlocks
is a dictionary which can contain many different code blocks, so don’t do codeBlocks: {...}
do codeBlocks.myBlock = {...}
.
Options to passed to cheerio.
The code for this module was originally taken from the Juice library.
MIT © Jonathan Kemp