Skip to content

Commit

Permalink
remove thenify
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Jan 10, 2015
1 parent b64e555 commit af2a385
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions fs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@

var thenifyAll = require('thenify-all')
var fs;
try {
fs = require('graceful-fs');
} catch(err) {
fs = require('fs');
}

require('thenify-all')(fs, exports, [
thenifyAll(fs, exports, [
'rename',
'ftruncate',
'chown',
Expand Down Expand Up @@ -37,10 +38,8 @@ require('thenify-all')(fs, exports, [
'appendFile',
])

var promisify = require('thenify')

// don't know enough about promises to do this haha
exports.exists = promisify(function exists(filename, done) {
exports.exists = thenifyAll.thenify(function exists(filename, done) {
fs.stat(filename, function (err) {
done(null, !err)
})
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"repository": "normalize/mz",
"dependencies": {
"native-or-bluebird": "1",
"thenify": "3",
"thenify-all": "1"
"thenify-all": ">= 1.6.0 < 2"
},
"devDependencies": {
"istanbul": "0",
Expand Down

0 comments on commit af2a385

Please sign in to comment.