{"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.3","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":{"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","vinyl"],"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":"ec8ea3e33549c8d935ea56e72bfa5f59e3bb869f","_id":"file-is-binary@0.2.3","_shasum":"51b62ea8c6cb687124a85d2034e8f0b22ecda8df","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.6.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"51b62ea8c6cb687124a85d2034e8f0b22ecda8df","tarball":"http://registry-npm.ywwl.com/file-is-binary/download/file-is-binary-0.2.3.tgz","integrity":"sha512-PCXq/lgcvPNlE89j0EEeYHPDW3gU1K1MpiEQWAWEafht2csYGna00iZswWkjqMLUAKJ1nII4jxUyWTNmLIxOig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy9plzTqRCmYsoqOQ+/8uvWYCSLTvoz47FhFgeQthZdwIgKLGD+bhmAgBmUlHoEkdABy2Aj15l2NwGFjqy9g+hkxY="}],"size":2734,"noattachment":false,"key":"/file-is-binary/-/file-is-binary-0.2.3.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/file-is-binary-0.2.3.tgz_1489818236387_0.7891814506147057"},"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":1489818238419,"_cnpm_publish_time":1489818238419,"dist-tags":{"latest":"1.0.0"}}