Skip to content

Latest commit

 

History

History
92 lines (63 loc) · 2.82 KB

File metadata and controls

92 lines (63 loc) · 2.82 KB

Table of Contents

HelloWorld

Main class, called HelloWorld

Examples

var HelloWorld = require('index.js');
var HW = new HelloWorld();
         OR
var HW = new HelloWorld('yo');

shout

Shout a phrase really loudly by adding an exclamation to the end, asynchronously

Parameters

  • string String phrase to shout
  • args Object different ways to shout
    • args.louder boolean adds exclamation points to the string
  • callback Function from whence the shout comes, returns a string

Examples

var HW = new HelloWorld();
HW.shout('rawr', { louder: true }, function(err, shout) {
  if (err) throw err;
  console.log(shout); // => 'rawr!'
});

wave

Say howdy to the world

Examples

var wave = HW.wave();
console.log(wave); // => 'howdy world!'

Returns String a happy-go-lucky string saying hi

hello_async

This is a standalone function (async) that logs a string.

Parameters

  • args Object different ways to alter the string
    • args.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.hello_async({ louder: true }, function(err, result) {
  if (err) throw err;
  console.log(result); // => "...threads are busy async bees...world!!!!"
});

Returns string an ever-so-slightly customizable string

hello

This is a standalone function (sync) that logs a string.

Examples

var module = require('./path/to/lib/index.js');
var check = module.hello();
console.log(check); // => "world"

Returns string "world"