JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1428339
  • Score
    100M100P100Q187039F
  • License MIT

Flattens the underlying C structures of a concatenated JavaScript string

Package Exports

  • flatstr

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (flatstr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

flatstr

Flattens the underlying C structures of a concatenated JavaScript string

About

If you're doing lots of string concatenation and then writing that string somewhere, you may find that passing your string through flatstr vastly improves performance. We've used it the fast logger pino's extreme mode to achieve 60% performance gains (from 250ms down to 100ms per 10000 ops) - the actual gains flatstr itself yields are 50% (150ms down to 100ms).

Usage

var flatstr = require('flatstr')
flatstr(someHeavilyConcatenatedString)

Acknowledgements

  • Sponsored by nearForm

License

MIT