Socket
Socket
Sign inDemoInstall

flatstr

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

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.5M
increased by5.09%
Maintainers
1
Weekly downloads
 
Created
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 50% (150ms down to 100ms).

Usage

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

Acknowledgements

  • Sponsored by nearForm

License

MIT

FAQs

Package last updated on 05 Apr 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc