Returning a value from inside Fibers(nodejs)
问题 So i'm having trouble trying to return a value from the constructor of this module. I literally have no idea how to return a value back to the constructor. I hope the code is self-explanatory, i want the constructor to return the hash variable. var Fiber = require('fibers'); var Future = require('fibers/future'), wait = Future.wait; var fs = require('fs') var crypto = require('crypto') exports.cryptFile = function(fileName, callback){ var crypt = crypto.createHash('md5'); var stream = fs