Skip to content
This repository has been archived by the owner on Mar 8, 2019. It is now read-only.

Commit

Permalink
removed unnecessary dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Sep 7, 2015
1 parent 2ec62ec commit 5565c04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

var promise = require('cb2promise');
var Errorifier = require('errorifier');
var ensureAsync = require('ensure-async');

var parseAsync = ensureAsync(function(data, cb) {
var parseAsync = function(data, cb) {
var content;
var error;

Expand All @@ -17,9 +16,11 @@ var parseAsync = ensureAsync(function(data, cb) {
message: err.message
});
} finally {
return cb(error, content);
return process.nextTick(function() {
return cb(error, content);
});
}
});
};

function parseJSON(data, cb) {
if (arguments.length === 1) return promise(parseAsync, data);
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
],
"dependencies": {
"cb2promise": "~1.0.0",
"ensure-async": "~1.0.0",
"errorifier": "~0.1.3"
},
"devDependencies": {
Expand Down

0 comments on commit 5565c04

Please sign in to comment.