AfterShip/node-phone — pull request #8 by andyburke (2014-07-25 11:50:33+00:00)
Title: Return objects instead of arrays.

Some minor code cleanups.
Add .jshintrc.
Make code pass jshint.

Returning objects make it clearer what data is being returned and allows for future expansion. It should also result in more readable code, eg:

```javascript
var resolved = phone( '213-555-5555' );
if ( !resolved ) {
console.error( 'Could not parse phone number!' );
return;
}

console.log( 'number: ' + resolved.phone );
console.log( 'country: ' + resolved.country );
```

In regards to expansion, imagine something like:

```javascript
var resolved = phone( '213-555-5555', myCountry, myPrefix );
if ( !resolved ) {
console.error( 'Could not parse phone number!' );
return;
}

console.log( 'number: ' + resolved.phone );
console.log( 'country: ' + resolved.country );
console.log( 'mobile: ' + resolved.isMobile ); // is it mobile?
console.log( 'local: ' + resolved.isLocal ); // local to myPrefix
console.log( 'sms support: ' + resolved.allowsSMS );
```

Those are just random examples of what could be added in the future, but the above is a lot cleaner than accessing the result as an array:

```javascript
var resolved = phone( '213-555-5555', myCountry, myPrefix );
if ( !resolved ) {
console.error( 'Could not parse phone number!' );
return;
}

console.log( 'number: ' + resolved[ 0 ]);
console.log( 'country: ' + resolved[ 1 ] );
console.log( 'mobile: ' + resolved[ 2 ] ); // is it mobile?
console.log( 'local: ' + resolved[ 2 ] ); // local to myPrefix
console.log( 'sms support: ' + resolved[ 4 ] );
```