UNPKG

mecano

Version:

Common functions for system deployment.

17 lines (16 loc) 544 B
// Generated by CoffeeScript 1.11.1 module.exports = function(options, callback) { if (options.time == null) { options.time = options.argument; } if (options.time == null) { return callback(new Error("Missing time: " + (JSON.stringify(options.time)))); } if (typeof options.time === 'string') { options.time = parseInt(options.time); } if (typeof options.time !== 'number') { return callback(new Error("Invalid time format: " + (JSON.stringify(options.time)))); } return setTimeout(callback, options.time); };