string.format like textformatter for javascript with plugin support for formatters