4.6 KiB
4.6 KiB
Is Text or Binary?
Determines if a buffer is comprised of text or binary
Install
NPM
- Use:
require('istextorbinary') - Install:
npm install --save istextorbinary
Usage
// Sync
var result = require('istextorbinary').isTextSync(filename, buffer);
// Async
require('istextorbinary').isText(filename, buffer, function(err, result){
// ...
});
// You can supply text or buffer, or both text and buffer, the more provided, the more accurate the result
// isBinary, and isBinarySync methods also provided
History
Discover the change history by heading on over to the HISTORY.md file.
Contribute
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
Backers
Maintainers
These amazing people are maintaining this project:
- Benjamin Lupton b@lupton.cc (https://github.com/balupton)
Sponsors
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
License
Licensed under the incredibly permissive MIT license
Copyright © 2012+ Bevry Pty Ltd us@bevry.me (http://bevry.me)
Copyright © 2011 Benjamin Lupton b@lupton.cc (http://balupton.com)