jaridmargolin / formatter.js

Format html inputs to match a specified pattern
http://firstopinion.github.io/formatter.js
2.48k stars 235 forks source link

Plain formatting #65

Closed andreyvital closed 10 years ago

andreyvital commented 10 years ago

can I use this outside of a node?

– goal:

var formatted = new Formatter('123123123', '({999}) - ({999}, {999})'); // (123) - (123, 123)

There's any way to reach this? Thanks.

jaridmargolin commented 10 years ago

The library was not built for this use case.

If desired, you could use a hidden element and simply grab the formatted value from it?

andreyvital commented 10 years ago

@jaridmargolin yes, but I already solved.