Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.1.2'
Browse files Browse the repository at this point in the history
* hotfix/v0.1.2:
  Release hotfix v0.1.2
  Increase coverage requirements
  Revise map example with promiseWithCallback usage
  Fix promiseWIthCallback example in README
  • Loading branch information
dsibilly committed Jun 2, 2017
2 parents b59df7e + 19bf2d4 commit 3aba7e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ __Example__
import fs from 'fs';
import presage from 'presage';

const pStats = file => new Promise((resolve, reject) => {
fs.stat(file, (error, stats) => {
if (error) {
reject(error);
} else {
resolve(stats);
}
});
});
const pState = file => {
const {
callbackFunction,
promise
} = presage.promiseWithCallback();

fs.stat(file, callbackFunction);
return promise;
}

presage.map([
'file1',
Expand Down Expand Up @@ -343,7 +343,7 @@ const pReadFile = (path, options) => {
promise
} = presage.promiseWithCallback();

fs.readFile(filename, options, callbackFunction);
fs.readFile(path, options, callbackFunction);
return promise;
};

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
"build": "BABEL_ENV=build babel js -d lib",
"coverage": "babel-node ./node_modules/.bin/babel-istanbul cover _mocha --report lcovonly -- -R spec",
"lint": "node_modules/.bin/eslint js",
"posttest": "[ -z \"$npm_config_coverage\" ] || babel-istanbul check-coverage --branches 80 --functions 100 --lines 95 --statements 95",
"posttest": "[ -z \"$npm_config_coverage\" ] || babel-istanbul check-coverage --branches 80 --functions 100 --lines 100 --statements 100",
"prepare": "npm run build",
"prepublishOnly": "npm run securityCheck && npm test --coverage",
"pretest": "npm run lint",
"securityCheck": "nsp check",
"start": "node lib/index.js",
"test": "babel-node ./node_modules/.bin/babel-istanbul test _mocha"
},
"version": "0.1.0"
"version": "0.1.2"
}

0 comments on commit 3aba7e4

Please sign in to comment.