src/uncss.js
function getStylesheets(files, options, pages) {
    if (options.stylesheets && options.stylesheets.length) {
        /* Simulate the behavior below */
        return Promise.resolve([files, options, pages, [options.stylesheets]]);
    }
    /* Extract the stylesheets from the HTML */
    return Promise.all(pages.map((page) => jsdom.getStylesheets(page, options)))
    .then((stylesheets) => [files, options, pages, stylesheets]);
}
function getStylesheets(files, options, pages) {
    if (options.stylesheets && options.stylesheets.length) {
        /* Simulate the behavior below */
        return Promise.resolve([files, options, pages, [options.stylesheets]]);
    }
    /* Extract the stylesheets from the HTML */
    return Promise.all(pages.map((page) => jsdom.getStylesheets(page, options)))
    .then((stylesheets) => [files, options, pages, stylesheets]);
}
function getStylesheets ( files , options , pages ) { if ( options . stylesheets && options . stylesheets . length ) { /* Simulate the behavior below */ return Promise . resolve ( [ files , options , pages , [ options . stylesheets ] ] ) ; } /* Extract the stylesheets from the HTML */ return Promise . all ( pages . map ( ( page ) => jsdom . getStylesheets ( page , options ) ) ) . then ( ( stylesheets ) => [ files , options , pages , stylesheets ] ) ; }
Get the contents of CSS files.
@param  {Array}   files   List of HTML files
@param  {Object}  options UnCSS options
@param  {Array}   pages   Pages opened by jsdom
@return {Promise}
Get the contents of CSS files .