Extract a list of stylesheets, scripts or HTML imports from HTML
npm install oust --save-dev
First include:
var oust = require('oust');
Resource links can then be extracted from either files:
var hrefs = oust(htmlString);
var srcs = oust(htmlString, 'script');
var hrefs = oust(htmlString, 'import');
Attribute | Default | Description |
---|---|---|
src |
`` | a valid HTML string to parse for references |
selector |
link |
one of link , script , import |
Released under an Apache 2 license. © Google 2014.