module.exports = function(options, callback) { if (!options) { options = { text: "It Works" }; } setTimeout(function() { try { var thisString = options.text || options; if (typeof thisString == "string") { callback(undefined, thisString); } else { callback(new Error("value is not a string"), undefined); } } catch (error) { callback(error, undefined); } }, getRandomInt(50,800)); } function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; }