Asynchronous class, called HelloObjectAsync
Examples
var module = require('index.js');
var Obj = new module.HelloObjectAsync('greg');
Say hello while doing expensive work in threads
Parameters
args
Object different ways to alter the stringargs.louder
boolean adds exclamation points to the string
callback
Function from whence the hello comes, returns a string
Examples
var module = require('index.js');
var Obj = new module.HelloObjectAsync('greg');
Obj.helloAsync({ louder: true }, function(err, result) {
if (err) throw err;
console.log(result); // => '...threads are busy async bees...hello greg!!!'
});
Returns String
Synchronous class, called HelloObject
Examples
var module = require('index.js');
var Obj = new module.HelloObject('greg');
Say hello
Examples
var x = Obj.hello();
console.log(x); // => '...initialized an object...hello greg'
Returns String
This is an asynchronous standalone function that logs a string.
Parameters
args
Object different ways to alter the stringargs.louder
boolean adds exclamation points to the string
callback
Function from whence the hello comes, returns a string
Examples
var module = require('./path/to/lib/index.js');
module.helloAsync({ louder: true }, function(err, result) {
if (err) throw err;
console.log(result); // => "...threads are busy async bees...hello world!!!!"
});
Returns string
This is a synchronous standalone function that logs a string.
Examples
var module = require('./path/to/lib/index.js');
var check = module.hello();
console.log(check); // => "hello world"
Returns string