npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

unformat.cxx

v1.2019.4

Published

Fastest type-safe parsing library in the world for C++14 or C++17 (up to 300x faster than std::regex); Adam Yaxley (2017).

Readme

Source available on GitHub

Unformat

Parsing and extraction of original data from brace style "{}" formatted strings. It basically unformats what you thought was formatted for good. It is developed and maintained by Adam Yaxley.

Installation

Run:

$ npm i unformat.cxx

And then include unformat.h as follows:

// main.cxx
#include "node_modules/unformat.cxx/unformat.h"

int main() { /* ... */ }

And then compile with clang++ or g++ as usual.

$ clang++ main.cxx  # or, use g++
$ g++     main.cxx

You may also use a simpler approach:

// main.cxx
#include <unformat.h>

int main() { /* ... */ }

If you add the path node_modules/unformat.cxx to your compiler's include paths.

$ clang++ -I./node_modules/unformat.cxx main.cxx  # or, use g++
$ g++     -I./node_modules/unformat.cxx main.cxx

Quick Example

Unformat is simple to use and works on all basic types. See the below example for extracting a std::string and an 'int'

std::string name;
int age;

unformat("Harry is 18 years old.", "{} is {} years old.", name, age);
// name == "Harry" and age == 18

As an optimisation, if the format string is known at compile time, it can be parsed into a constant expression by making use of ay::make_format. In tests, this increases runtime speed by a factor of 3 or 4.

std::string name;
int age;

constexpr auto format = ay::make_format("{} is {} years old.");
unformat("Harry is 18 years old.", format, name, age);
// name == "Harry" and age == 18

How do I use this library?

Unformat is a single-file header only library so integration is easy. All you need to do is copy unformat.h into your project, and away you go.

Public Domain

This software is completely open source and in the public domain. See LICENSE for details.

Contributing

Pull requests are very welcome. You may also create Issues and I will have a look into it as soon as I can.

Speed

Unformat is super awesome back to the future style lightning fast compared to traditional parsing methods. Below is the output from Google Benchmark on unformat_benchmark.cpp. Great Scott!

Run on (16 X 2993 MHz CPU s)
03/13/19 18:10:57
--------------------------------------------------------------------
Benchmark                             Time           CPU Iterations
--------------------------------------------------------------------
Unformat                             72 ns         71 ns    8960000
Unformat_ConstChar                   69 ns         70 ns    8960000
Unformat_ConstexprMakeFormat         36 ns         35 ns   19478261
StdStringStream                     844 ns        854 ns     896000
StdRegex                           9975 ns      10010 ns      64000
StdScanf                           1716 ns       1726 ns     407273

SRC ORG