-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use a `Set` and ES2015ify Fixes #1. * Inline return * Meta tweaks * Add XO
- Loading branch information
1 parent
7a60b54
commit 0ad27ac
Showing
6 changed files
with
18 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- 'iojs' | ||
- '0.12' | ||
- '0.10' | ||
- '6' | ||
- '4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
'use strict'; | ||
var path = require('path'); | ||
var binaryExtensions = require('binary-extensions'); | ||
var exts = Object.create(null); | ||
const path = require('path'); | ||
const binaryExtensions = require('binary-extensions'); | ||
|
||
binaryExtensions.forEach(function (el) { | ||
exts[el] = true; | ||
}); | ||
const exts = new Set(binaryExtensions); | ||
|
||
module.exports = function (filepath) { | ||
return path.extname(filepath).slice(1).toLowerCase() in exts; | ||
}; | ||
module.exports = filepath => exts.has(path.extname(filepath).slice(1).toLowerCase()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters