poppler-simple
Advanced tools
Comparing version 0.2.3 to 0.2.4
(function () { | ||
"use strict"; | ||
var Promise = require("bluebird"); | ||
try { | ||
@@ -55,2 +56,38 @@ try { | ||
} | ||
})(); | ||
module.exports.PopplerPage.prototype.renderToFileAsync = function () { | ||
var self = this; | ||
var args = Array.prototype.slice.call(arguments); | ||
return new Promise(function (resolve, reject) { | ||
if (typeof args[args.length - 1] === 'function') { | ||
args.pop(); | ||
} | ||
args.push(function (err, result) { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(result); | ||
} | ||
}); | ||
self.renderToFile.apply(self, args); | ||
}); | ||
}; | ||
module.exports.PopplerPage.prototype.renderToBufferAsync = function () { | ||
var self = this; | ||
var args = Array.prototype.slice.call(arguments); | ||
return new Promise(function (resolve, reject) { | ||
if (typeof args[args.length - 1] === 'function') { | ||
args.pop(); | ||
} | ||
args.push(function (err, result) { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(result); | ||
} | ||
}); | ||
self.renderToBuffer.apply(self, args); | ||
}); | ||
}; | ||
})(); |
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"repository": { | ||
@@ -26,2 +26,3 @@ "type": "git", | ||
"dependencies": { | ||
"bluebird": "^3.2.1", | ||
"nan": "^2.0.9" | ||
@@ -28,0 +29,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
454055
88
2
+ Addedbluebird@^3.2.1
+ Addedbluebird@3.7.2(transitive)