lib/rule.js
function(name, data, testFunction){

    if(!_.isString(name)){
        throw new Error('String expected for parameter name');
    }

    if(!_.isArray(data)){
        throw new Error('Array expected for parameter data');
    }

    if(!_.isFunction(testFunction)){
        throw new Error('Function expected for parameter testFunction');
    }

	this._name = name;
	this._testFunction = testFunction;
	this._res = [];
	this._data = data;
    this._itr = 0;
}
function(name, data, testFunction){

    if(!_.isString(name)){
        throw new Error('String expected for parameter name');
    }

    if(!_.isArray(data)){
        throw new Error('Array expected for parameter data');
    }

    if(!_.isFunction(testFunction)){
        throw new Error('Function expected for parameter testFunction');
    }

	this._name = name;
	this._testFunction = testFunction;
	this._res = [];
	this._data = data;
    this._itr = 0;
}
function ( name , data , testFunction ) { if ( ! _ . isString ( name ) ) { throw new Error ( 'String expected for parameter name' ) ; } if ( ! _ . isArray ( data ) ) { throw new Error ( 'Array expected for parameter data' ) ; } if ( ! _ . isFunction ( testFunction ) ) { throw new Error ( 'Function expected for parameter testFunction' ) ; } this . _name = name ; this . _testFunction = testFunction ; this . _res = [ ] ; this . _data = data ; this . _itr = 0 ; }
Encapsulate rules for identifying phone numbers
@param {string }name - Name of the rule
@param {array} data - The array of numbers to be examined
@param {function} testFunction - The rule where the number crunching happens
@constructor
Encapsulate rules for identifying phone numbers