Socket
Socket
Sign inDemoInstall

flatstr

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    flatstr

Flattens the underlying C structures of a concatenated JavaScript string


Version published
Weekly downloads
1.3M
decreased by-11.99%
Maintainers
1
Install size
1.93 kB
Created
Weekly downloads
 

Readme

Source

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 44% (150ms down to 100ms).

Usage

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

Acknowledgements

  • Sponsored by nearForm

License

MIT

FAQs

Last updated on 05 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc