Skip to content

Statistics

Lukas Geiter edited this page May 17, 2017 · 1 revision

If you're using this library in a CLI context, you might want to print some statistics after you're done. extractor.printStats() will do all the work for you (using console.log).

Note: If you want the output to be colored, make sure you have installed chalk. It's not included in this package's dependencies since it isn't required for any of the functionality, but it's very likely that a different package already installed it in your project.

This is what the stats look like:

   6 messages extracted
  ---------------------------------
   7 total usages
  10 files (3 with messages)
   1 message context (default)

If you would rather get the raw numbers, use extractor.getStats().
Take a look at the API Reference for more details.

Clone this wiki locally