aboutsummaryrefslogtreecommitdiff
path: root/node_modules/is-binary-path
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/is-binary-path')
-rw-r--r--node_modules/is-binary-path/index.js12
-rw-r--r--node_modules/is-binary-path/license21
-rw-r--r--node_modules/is-binary-path/package.json75
-rw-r--r--node_modules/is-binary-path/readme.md34
4 files changed, 142 insertions, 0 deletions
diff --git a/node_modules/is-binary-path/index.js b/node_modules/is-binary-path/index.js
new file mode 100644
index 0000000..6c8c7e7
--- /dev/null
+++ b/node_modules/is-binary-path/index.js
@@ -0,0 +1,12 @@
+'use strict';
+var path = require('path');
+var binaryExtensions = require('binary-extensions');
+var exts = Object.create(null);
+
+binaryExtensions.forEach(function (el) {
+ exts[el] = true;
+});
+
+module.exports = function (filepath) {
+ return path.extname(filepath).slice(1).toLowerCase() in exts;
+};
diff --git a/node_modules/is-binary-path/license b/node_modules/is-binary-path/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/is-binary-path/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/is-binary-path/package.json b/node_modules/is-binary-path/package.json
new file mode 100644
index 0000000..82a1515
--- /dev/null
+++ b/node_modules/is-binary-path/package.json
@@ -0,0 +1,75 @@
+{
+ "_args": [
+ [
+ "is-binary-path@1.0.1",
+ "/home/dstaesse/git/website"
+ ]
+ ],
+ "_development": true,
+ "_from": "is-binary-path@1.0.1",
+ "_id": "is-binary-path@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+ "_location": "/is-binary-path",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "is-binary-path@1.0.1",
+ "name": "is-binary-path",
+ "escapedName": "is-binary-path",
+ "rawSpec": "1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "1.0.1"
+ },
+ "_requiredBy": [
+ "/chokidar"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+ "_spec": "1.0.1",
+ "_where": "/home/dstaesse/git/website",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/is-binary-path/issues"
+ },
+ "dependencies": {
+ "binary-extensions": "^1.0.0"
+ },
+ "description": "Check if a filepath is a binary file",
+ "devDependencies": {
+ "ava": "0.0.4"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/is-binary-path#readme",
+ "keywords": [
+ "bin",
+ "binary",
+ "ext",
+ "extensions",
+ "extension",
+ "file",
+ "path",
+ "check",
+ "detect",
+ "is"
+ ],
+ "license": "MIT",
+ "name": "is-binary-path",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/is-binary-path.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.0.1"
+}
diff --git a/node_modules/is-binary-path/readme.md b/node_modules/is-binary-path/readme.md
new file mode 100644
index 0000000..a17d6a2
--- /dev/null
+++ b/node_modules/is-binary-path/readme.md
@@ -0,0 +1,34 @@
+# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path)
+
+> Check if a filepath is a binary file
+
+
+## Install
+
+```
+$ npm install --save is-binary-path
+```
+
+
+## Usage
+
+```js
+var isBinaryPath = require('is-binary-path');
+
+isBinaryPath('src/unicorn.png');
+//=> true
+
+isBinaryPath('src/unicorn.txt');
+//=> false
+```
+
+
+## Related
+
+- [`binary-extensions`](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions
+- [`is-text-path`](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)