diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-28 00:38:50 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-28 00:40:43 +0200 |
commit | 7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 (patch) | |
tree | 6de9a1aebd150a23b7f8c273ec657a5d0a18fe3e /node_modules/is-promise | |
parent | 963b7a41feb29cc4be090a2446bdfe0c1f1bcd81 (diff) |
add linting (and some initial fixes)
Diffstat (limited to 'node_modules/is-promise')
-rw-r--r-- | node_modules/is-promise/.npmignore | 6 | ||||
-rw-r--r-- | node_modules/is-promise/.travis.yml | 3 | ||||
-rw-r--r-- | node_modules/is-promise/LICENSE | 19 | ||||
-rw-r--r-- | node_modules/is-promise/index.js | 5 | ||||
-rw-r--r-- | node_modules/is-promise/package.json | 19 | ||||
-rw-r--r-- | node_modules/is-promise/readme.md | 29 |
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 + + [](https://travis-ci.org/then/is-promise) + [](https://gemnasium.com/then/is-promise) + [](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 |