-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ead1bc
commit 09c48bf
Showing
5 changed files
with
113 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: node_js | ||
node_js: | ||
- '7' | ||
- '6' | ||
- '5' | ||
- '4' | ||
cache: | ||
yarn: true | ||
directories: | ||
- node_modules | ||
after_success: | ||
- npm run coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,6 @@ | |
"**/node_modules": true, | ||
"**/.vscode": true, | ||
"**/dist": true, | ||
"**/.**": true | ||
"**/.**": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) René Viering <[email protected]> (rene.js.org) | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[](https://bullg.it/) | ||
[](https://bullg.it/) | ||
|
||
[](http://badge.fury.io/js/promise-promise) | ||
[](https://travis-ci.org/bullgit/promise-promise) | ||
[](https://coveralls.io/github/bullgit/promise-promise?branch=master) | ||
[](https://david-dm.org/bullgit/promise-promise#info=devDependencies) | ||
[](https://www.youtube.com/watch?v=qRC4Vk6kisY) | ||
|
||
# promise-promise | ||
|
||
> A funny Promise API for those who can't keep promises. There's a 50:50 chance that the promise will be fulfilled. If not, it rejects with a random developer excuse. 😎😇 Good luck 🙈 | ||
## Install | ||
|
||
``` | ||
$ npm install promise-promise --save | ||
``` | ||
|
||
## Usage | ||
|
||
```javascript | ||
import Promise from 'promise-promise'; | ||
|
||
const myAsyncOperation = new Promise(resolve => { | ||
resolve('I should resolve 😱'); | ||
}); | ||
|
||
|
||
myAsyncOperation | ||
.then(response => { | ||
console.log(response); // Sometimes it resolves | ||
}) | ||
.catch(error => { | ||
console.log(err); // Sometimes not 😎 | ||
}); | ||
``` | ||
|
||
## License | ||
MIT © [René Viering](http://rene.js.org) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,41 @@ | ||
{ | ||
"name": "promise-promise", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "jest --coverage", | ||
"test:dev": "jest --watch", | ||
"test:cov": "jest --coverage", | ||
"build": "rollup -c && rollup -c rollup.prod.config.js", | ||
"build:dev": "rollup -c rollup.prod.config.js", | ||
"build:prod": "rollup -c rollup.prod.config.js", | ||
"coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls" | ||
}, | ||
"author": "René Viering", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"babel-jest": "^17.0.2", | ||
"babel-preset-es2015-rollup": "^1.2.0", | ||
"coveralls": "^2.11.15", | ||
"eslint": "^3.11.1", | ||
"eslint-config-xo": "^0.17.0", | ||
"jest": "^17.0.3", | ||
"rollup": "^0.36.4", | ||
"rollup-plugin-babel": "^2.6.1", | ||
"rollup-plugin-commonjs": "^5.0.5", | ||
"rollup-plugin-node-resolve": "^2.0.0", | ||
"rollup-plugin-sourcemaps": "^0.4.1", | ||
"rollup-plugin-uglify": "^1.0.1" | ||
} | ||
"name": "promise-promise", | ||
"version": "0.0.0", | ||
"description": "A funny Promise API for those who can't keep promises.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "jest --coverage", | ||
"test:dev": "jest --watch", | ||
"test:cov": "jest --coverage", | ||
"build": "rollup -c && rollup -c rollup.prod.config.js", | ||
"build:dev": "rollup -c rollup.prod.config.js", | ||
"build:prod": "rollup -c rollup.prod.config.js", | ||
"coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls" | ||
}, | ||
"files": [ | ||
"dist", | ||
"index.js" | ||
], | ||
"author": "René Viering", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"babel-jest": "^17.0.2", | ||
"babel-preset-es2015-rollup": "^1.2.0", | ||
"coveralls": "^2.11.15", | ||
"eslint": "^3.11.1", | ||
"eslint-config-xo": "^0.17.0", | ||
"jest": "^17.0.3", | ||
"rollup": "^0.36.4", | ||
"rollup-plugin-babel": "^2.6.1", | ||
"rollup-plugin-commonjs": "^5.0.5", | ||
"rollup-plugin-node-resolve": "^2.0.0", | ||
"rollup-plugin-sourcemaps": "^0.4.1", | ||
"rollup-plugin-uglify": "^1.0.1" | ||
}, | ||
"keywords": [ | ||
"promises", | ||
"es6", | ||
"funny", | ||
"bullgit" | ||
] | ||
} |