Skip to content

Commit

Permalink
Switch to Array.some.
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshpai authored and XhmikosR committed Dec 22, 2017
1 parent a4a507c commit 0c63b1e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ const staticify = (root, options) => {
root = root || directory;
vers = vers || {};

for (let i = 0, len = ignoredDirectories.length; i < len; i++) {
if (directory.includes(ignoredDirectories[i]) && opts.includeAll === false) {
return;
}
if (opts.includeAll === false && ignoredDirectories.some(d => directory.includes(d))) {
return;
}

const files = fs.readdirSync(directory);
Expand Down

0 comments on commit 0c63b1e

Please sign in to comment.