A .NET library for running messageformat.js on the server.
This library supports three different js engines:
- node.js (requires that you have a node.js server) via
MessageFormat.Instance.ConfigureEngine(new NodeJsEngine("my url"));
- ClearScript (requires that you can run native binaries) via
- Jurassic via
Message struct for convenience
Message struct will make working with
MessageFormat a bit easier, but requires that you supply some additional configuration via
See the tests for example usages of the
Running on node.js
If you want to run the version that utilizes node.js:
- Install node.js
npm install express
npm install messageformat
Start it by running
node node-server.js in a command prompt from the project's root directory.
Feel free to request features, report any bugs/issues you find, or make a pull request. I might not get to it as soon as you'd like (I have other projects / a job that also require my attention), but I'll do my best to fix/merge what comes in as soon as I can.
Machine: i7 950 @ 3.07GHz running Windows 8 (node.js running in Windows as well)
- node.js (requires a node.js server): ~3,000 string generations/s
- ClearScript (requires running native binaries): ~3,000 string generations/s
- Jurassic: ~30 string generations/s (ouch!)