lib/say-something.js
function (config) {
  'use strict';

  //If is not instance of SaySomething  return a new instance
  if (false === (this instanceof SaySomething)) {
    return new SaySomething(config);
  }

  events.EventEmitter.call(this);

  this.defaults = {
    language: 'en'
  };

  //Extend default with the config object
  _.extend(this.defaults, config);

  return this;
}
function (config) {
  'use strict';

  //If is not instance of SaySomething  return a new instance
  if (false === (this instanceof SaySomething)) {
    return new SaySomething(config);
  }

  events.EventEmitter.call(this);

  this.defaults = {
    language: 'en'
  };

  //Extend default with the config object
  _.extend(this.defaults, config);

  return this;
}
function ( config ) { 'use strict' ; //If is not instance of SaySomething  return a new instance if ( false === ( this instanceof SaySomething ) ) { return new SaySomething ( config ) ; } events . EventEmitter . call ( this ) ; this . defaults = { language : 'en' } ; //Extend default with the config object _ . extend ( this . defaults , config ) ; return this ; }
Creates an instance of the SaySomething object.
@class
@param config {object} - configuration object.
@param config.language {string} - OPTIONAL (dafault 'en').
@extends EventEmitter
@fires taliking - will be emitted when talking something.
@fires done - will be emitted after say something.
@example
```js
var SaySomething = require('say-something'),
saySomething = new SaySomething({
language: 'pt-br' //default language is 'en'
});
```
Creates an instance of the SaySomething object .