Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract binary filepath detection into separate modules #220

Merged
merged 1 commit into from Jan 24, 2015
Merged

Extract binary filepath detection into separate modules #220

merged 1 commit into from Jan 24, 2015

Conversation

sindresorhus
Copy link
Contributor

I've extracted the binary filepath detection into separate modules so other projects can benefit from the list of binary file extensions too.

https://github.com/sindresorhus/is-binary-path
https://github.com/sindresorhus/binary-extensions

I've added you both to the above modules on GitHub and npm.

@@ -979,11 +979,4 @@ describe('is-binary', function() {
it('should be a function', function() {
isBinary.should.be.a('function');
});
it('should correctly determine binary files', function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These passed before I removed them. No point in having them here as they're in is-binary-path.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 98.23% when pulling 740099b on sindresorhus:modularize into a0dd61d on paulmillr:master.

@es128
Copy link
Collaborator

es128 commented Jan 24, 2015

Thanks! LGTM

es128 added a commit that referenced this pull request Jan 24, 2015
Extract binary filepath detection into separate modules
@es128 es128 merged commit 151c27b into paulmillr:master Jan 24, 2015
@sindresorhus sindresorhus deleted the modularize branch January 24, 2015 14:23
@silverwind
Copy link

Just a friendly FYI: I like using isBinaryFile for binary detection which doesn't rely on (hard to maintain) file extensions :)

@es128
Copy link
Collaborator

es128 commented Jan 24, 2015

Yeah but proper detection with fs operations is too heavy for this use-case.

@silverwind
Copy link

True, it hurts performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants