{"name":"file-is-binary","description":"Returns true if a file is binary. Checks the actual contents, since extensions are not reliable. Basic wrapper for isbinaryfile to support vinyl files.","version":"0.2.2","homepage":"https://github.com/jonschlinkert/file-is-binary","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/file-is-binary.git"},"bugs":{"url":"https://github.com/jonschlinkert/file-is-binary/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"file-stat":"^1.0.0","isbinaryfile":"^3.0.2","isobject":"^3.0.0"},"devDependencies":{"gulp-format-md":"^0.1.11","mocha":"^3.2.0","vinyl":"^2.0.1"},"keywords":["binary","file","is"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["file-contents","file-stat","gulp-is-binary"]},"reflinks":["verb","verb-generate-readme"],"lint":{"reflinks":true}},"gitHead":"254681044bbdd4d07bc72eab578833b82142aa2f","_id":"file-is-binary@0.2.2","_shasum":"ebf03d229865ec759c954e0b780216b1e40dc733","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ebf03d229865ec759c954e0b780216b1e40dc733","tarball":"http://registry-npm.ywwl.com/file-is-binary/download/file-is-binary-0.2.2.tgz","integrity":"sha512-qgTeseVSkeJNgvYeX2CCOYQqZgp95ZQN4uBUwf5UfqvaTKgwsFAYiyLG271S+Nb8R2mCPcJiKOj0jD4ClctVQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEaHJC1QQaGw0JTYoW8B0YkxiCu51dczfCq4qpCVmlyZAiApkK8npSPH1GTmqb3yTKZuJb1DMHMEpk11WmeX7CFHmQ=="}],"size":2732,"noattachment":false,"key":"/file-is-binary/-/file-is-binary-0.2.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/file-is-binary-0.2.2.tgz_1486084628228_0.6077886272687465"},"directories":{},"readme":"# file-is-binary [![NPM version](https://img.shields.io/npm/v/file-is-binary.svg?style=flat)](https://www.npmjs.com/package/file-is-binary) [![NPM monthly downloads](https://img.shields.io/npm/dm/file-is-binary.svg?style=flat)](https://npmjs.org/package/file-is-binary) [![NPM total downloads](https://img.shields.io/npm/dt/file-is-binary.svg?style=flat)](https://npmjs.org/package/file-is-binary) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/file-is-binary.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/file-is-binary)\n\n> Returns true if a file is binary. Checks the actual contents, since extensions are not reliable. Basic wrapper for isbinaryfile to support vinyl files.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save file-is-binary\n```\n\n## Usage\n\nUses [isbinaryfile](https://github.com/gjtorikian/isBinaryFile) to check the file contents and return\n\n```js\nvar isBinary = require('file-is-binary');\n\nvar file = new File({path: 'foo.gif', contents: fs.readFileSync('foo.gif')});\nconsole.log(isBinary(file));\n\nvar file = new File({path: 'bar.txt', contents: fs.readFileSync('bar.txt')});\nconsole.log(isBinary(file));\n//=> false\n```\n\n## About\n\n### Related projects\n\n* [file-contents](https://www.npmjs.com/package/file-contents): Set the `contents` property on a file object. Abstraction from vinyl-fs to support stream or… [more](https://github.com/jonschlinkert/file-contents) | [homepage](https://github.com/jonschlinkert/file-contents \"Set the `contents` property on a file object. Abstraction from vinyl-fs to support stream or non-stream usage.\")\n* [file-stat](https://www.npmjs.com/package/file-stat): Set the `stat` property on a file object. Abstraction from vinyl-fs to support stream or… [more](https://github.com/jonschlinkert/file-stat) | [homepage](https://github.com/jonschlinkert/file-stat \"Set the `stat` property on a file object. Abstraction from vinyl-fs to support stream or non-stream usage.\")\n* [gulp-is-binary](https://www.npmjs.com/package/gulp-is-binary): Adds an `.isBinary()` function to the `file` object, similar to `file.isNull()` and `file.isStream()`. | [homepage](https://github.com/jonschlinkert/gulp-is-binary \"Adds an `.isBinary()` function to the `file` object, similar to `file.isNull()` and `file.isStream()`.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 19, 2017._","publish_time":1486084630310,"_cnpm_publish_time":1486084630310,"dist-tags":{"latest":"1.0.0"}}