The pattern matching is basically a
switch on steroids, you can create powerful conditions such based on
Object properties or
Array content without manipulating the
formatter.js is a library to format user input to match a specified pattern. Credit card, phone number, currency and zip code form formatting etc...
Also there is a jQuery wrapper version too.