Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stevekinney committed Mar 9, 2013
1 parent 9ce9545 commit 09c1032
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@ phoneFormatter.format("2125551212", "(NNN) NNN-NNNN");

### But I want to do both at the same time!

That's cool. Pass some extra configuration options to the format method.
That's cool. Do it.

```javascript
phoneFormatter.format("(212) 555-1212", "NNN.NNN.NNNN", {normalize: true})
phoneFormatter.format("(212) 555-1212", "NNN.NNN.NNNN")
// returns "212.555.1212"
```

If for some reason, this is not what you want: you can turn it off.

```javascript
phoneFormatter.format("(212) 555-1212", "NNN.NNN.NNNN", {normalize: false})
// Will probably crash and burn hideously. What are you even doing?
```

## Documentation

As it stands, there are only two methods, `normalize` and `format`. They are pretty much fleshed out above. That said, I'm reserving this second for future greatness.
Expand Down Expand Up @@ -65,6 +72,7 @@ Right now, this library is incredibly American-centric and that kind of stinks,

## Release History

* 0.0.2: Normalize phone numbers by default.
* 0.0.1: Just two methods and some tests.

## License
Expand Down

0 comments on commit 09c1032

Please sign in to comment.