Extract URLs to stylesheets, scripts, links, images or HTML imports from HTML
$ npm install --save-dev oustFirst include:
var oust = require('oust');Resource links can then be extracted from either files:
var hrefs = oust(htmlString, 'stylesheets');var srcs = oust(htmlString, 'scripts');var hrefs = oust(htmlString, 'imports');var srcs = oust(htmlString, 'links');var srcs = oust(htmlString, 'images');| Attribute | Default | Description |
|---|---|---|
src |
`` | a valid HTML string to parse for references |
type |
`` | one of stylesheets, scripts, imports, links, images |
$ npm install --global oustExtract URLs to stylesheets, scripts, links, images or HTML imports from HTML
Usage:
$ oust <filename> <type>$ oust myFile.html stylesheets$ oust myFile.html scripts$ oust myFile.html imports$ oust myFile.html links$ oust myFile.html imagesReleased under an Apache 2 license. © Google 2014.