summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/is-promise
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/is-promise')
-rw-r--r--tools/node_modules/eslint/node_modules/is-promise/LICENSE19
-rw-r--r--tools/node_modules/eslint/node_modules/is-promise/index.js5
-rw-r--r--tools/node_modules/eslint/node_modules/is-promise/package.json50
-rw-r--r--tools/node_modules/eslint/node_modules/is-promise/readme.md29
4 files changed, 103 insertions, 0 deletions
diff --git a/tools/node_modules/eslint/node_modules/is-promise/LICENSE b/tools/node_modules/eslint/node_modules/is-promise/LICENSE
new file mode 100644
index 0000000000..27cc9f3771
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-promise/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Forbes Lindesay
+
+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. \ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/is-promise/index.js b/tools/node_modules/eslint/node_modules/is-promise/index.js
new file mode 100644
index 0000000000..ca2444c6f6
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-promise/index.js
@@ -0,0 +1,5 @@
+module.exports = isPromise;
+
+function isPromise(obj) {
+ return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
+}
diff --git a/tools/node_modules/eslint/node_modules/is-promise/package.json b/tools/node_modules/eslint/node_modules/is-promise/package.json
new file mode 100644
index 0000000000..d8d6694f4c
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-promise/package.json
@@ -0,0 +1,50 @@
+{
+ "_from": "is-promise@^2.1.0",
+ "_id": "is-promise@2.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
+ "_location": "/eslint/is-promise",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-promise@^2.1.0",
+ "name": "is-promise",
+ "escapedName": "is-promise",
+ "rawSpec": "^2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.0"
+ },
+ "_requiredBy": [
+ "/eslint/run-async"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
+ "_shasum": "79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa",
+ "_spec": "is-promise@^2.1.0",
+ "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/run-async",
+ "author": {
+ "name": "ForbesLindesay"
+ },
+ "bugs": {
+ "url": "https://github.com/then/is-promise/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Test whether an object looks like a promises-a+ promise",
+ "devDependencies": {
+ "better-assert": "~0.1.0",
+ "mocha": "~1.7.4"
+ },
+ "homepage": "https://github.com/then/is-promise#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "is-promise",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/then/is-promise.git"
+ },
+ "scripts": {
+ "test": "mocha -R spec"
+ },
+ "version": "2.1.0"
+}
diff --git a/tools/node_modules/eslint/node_modules/is-promise/readme.md b/tools/node_modules/eslint/node_modules/is-promise/readme.md
new file mode 100644
index 0000000000..50d5d98911
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/is-promise/readme.md
@@ -0,0 +1,29 @@
+<a href="http://promises-aplus.github.com/promises-spec"><img src="http://promises-aplus.github.com/promises-spec/assets/logo-small.png" align="right" /></a>
+# is-promise
+
+ Test whether an object looks like a promises-a+ promise
+
+ [![Build Status](https://img.shields.io/travis/then/is-promise/master.svg)](https://travis-ci.org/then/is-promise)
+ [![Dependency Status](https://img.shields.io/gemnasium/then/is-promise.svg)](https://gemnasium.com/then/is-promise)
+ [![NPM version](https://img.shields.io/npm/v/is-promise.svg)](https://www.npmjs.org/package/is-promise)
+
+## Installation
+
+ $ npm install is-promise
+
+You can also use it client side via npm.
+
+## API
+
+```javascript
+var isPromise = require('is-promise');
+
+isPromise({then:function () {...}});//=>true
+isPromise(null);//=>false
+isPromise({});//=>false
+isPromise({then: true})//=>false
+```
+
+## License
+
+ MIT