Skip to content

Instantly share code, notes, and snippets.

function read_a_file_and_replace_x_with_smilies (filePath) {
// Set up a future
var fut = new Future();
fs.readFile(filePath, function (err, data) {
if (err) fut.return({ error: err });
doImageMani(data, function (err) {
if (err) fut.return({ error: err });
// everythings done, no need to return anything