nl_tokens: Given an array of filenames return an array of the files contents only if the filename matches a regex
pl_tokens: function readStylesheets ( files , outputBanner ) { return Promise . all ( files . map ( ( filename ) => { if ( isURL ( filename ) ) { return new Promise ( ( resolve , reject ) => { request ( { url : filename , headers : { 'User-Agent' : 'UnCSS' } } , ( err , response , body ) => { if ( err ) { return reject ( err ) ; } return resolve ( body ) ; } ) ; } ) ; } else if ( fs . existsSync ( filename ) ) { return new Promise ( ( resolve , reject ) => { fs . readFile ( filename , 'utf-8' , ( err , contents ) => { if ( err ) { return reject ( err ) ; } return resolve ( contents ) ; } ) ; } ) ; } throw new Error ( ` ${ path . join ( process . cwd ( ) , <mask> ) } ` ) ; } ) ) . then ( ( res ) => { // res is an array of the content of each file in files (in the same order) if ( outputBanner ) { for ( let i = 0 , len = files . length ; i < len ; i ++ ) { // We append a small banner to keep track of which file we are currently processing // super helpful for debugging const banner = ` ${ files [ i ] . replace ( / \\ / g , '/' ) } \n ` ; res [ i ] = banner + res [ i ] ; } } return res ; } ) ; }