aboutsummaryrefslogtreecommitdiff
path: root/node_modules/is-promise
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-28 00:38:50 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-28 00:40:43 +0200
commit7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 (patch)
tree6de9a1aebd150a23b7f8c273ec657a5d0a18fe3e /node_modules/is-promise
parent963b7a41feb29cc4be090a2446bdfe0c1f1bcd81 (diff)
downloadwallet-core-7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027.tar.xz
add linting (and some initial fixes)
Diffstat (limited to 'node_modules/is-promise')
-rw-r--r--node_modules/is-promise/.npmignore6
-rw-r--r--node_modules/is-promise/.travis.yml3
-rw-r--r--node_modules/is-promise/LICENSE19
-rw-r--r--node_modules/is-promise/index.js5
-rw-r--r--node_modules/is-promise/package.json19
-rw-r--r--node_modules/is-promise/readme.md29
6 files changed, 81 insertions, 0 deletions
diff --git a/node_modules/is-promise/.npmignore b/node_modules/is-promise/.npmignore
new file mode 100644
index 000000000..aeb7b4536
--- /dev/null
+++ b/node_modules/is-promise/.npmignore
@@ -0,0 +1,6 @@
+component
+build
+node_modules
+test.js
+component.json
+.gitignore \ No newline at end of file
diff --git a/node_modules/is-promise/.travis.yml b/node_modules/is-promise/.travis.yml
new file mode 100644
index 000000000..87f8cd91a
--- /dev/null
+++ b/node_modules/is-promise/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - "0.10" \ No newline at end of file
diff --git a/node_modules/is-promise/LICENSE b/node_modules/is-promise/LICENSE
new file mode 100644
index 000000000..27cc9f377
--- /dev/null
+++ b/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/node_modules/is-promise/index.js b/node_modules/is-promise/index.js
new file mode 100644
index 000000000..ca2444c6f
--- /dev/null
+++ b/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/node_modules/is-promise/package.json b/node_modules/is-promise/package.json
new file mode 100644
index 000000000..cd8dae933
--- /dev/null
+++ b/node_modules/is-promise/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "is-promise",
+ "version": "2.1.0",
+ "description": "Test whether an object looks like a promises-a+ promise",
+ "main": "index.js",
+ "scripts": {
+ "test": "mocha -R spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/then/is-promise.git"
+ },
+ "author": "ForbesLindesay",
+ "license": "MIT",
+ "devDependencies": {
+ "better-assert": "~0.1.0",
+ "mocha": "~1.7.4"
+ }
+}
diff --git a/node_modules/is-promise/readme.md b/node_modules/is-promise/readme.md
new file mode 100644
index 000000000..50d5d9891
--- /dev/null
+++ b/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