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
argsObject different ways to alter the stringargs.louderboolean adds exclamation points to the string
callbackFunction 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
argsObject different ways to alter the stringargs.louderboolean adds exclamation points to the string
callbackFunction 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