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

asap.cxx

v1.2023.4

Published

A C++ header-only library for creating, displaying, iterating and manipulating dates; Leonardo Guilherme de Freitas (2017).

Readme

The ASAP date/time library for beautiful C++ code

ASAP is a small, header-only date-time library for C++11 and beyond - by Leonardo Guilherme de Freitas. It is heavily inspired by my great time using momentjs to parse and display dates. ASAP has a lot of syntatic sugar to make your code look pretty both on the inside and outside :)

All ASAP examples available online at repl.it. (main() starts at line 533)

Installation

Run:

$ npm i asap.cxx

And then include asap.h as follows:

#include "node_modules/asap.cxx/include/asap/asap.h"

Features

  • A date/time class to handle dates and time (duh)
  • A duration class to handle unbounded periods (e.g, asap::day(1) specifies a day)
  • A period class to handle bounded periods (e.g, asap::period(asap::now(), asap::tomorrow()))
  • Lots of syntatic sugar (e.g, auto then = asap::now() + asap::week(1))
  • Literals (e.g, auto then = asap::now() + 1_year) for seconds, minutes, hours, days, weeks, months and years
  • Broken down duration printing (e.g, asap::days(10) prints "1 week, 3 days")
  • Range-based iteration for periods:
   for (auto x: asap::now().until(asap::tomorrow()).every(1_hour)) {
        std::cout << x << std::endl;
   }

Index

  • asap::datetime class docs to learn about date/time
  • asap::duration class docs will teach you about durations and their literals
  • asap::period class docs to learn about periods and date/time iterations
  • literals.h docs has the asap::literals namespace with all ASAP literals

Using

You can either:

  • Drop the include/asap folder in your project and use it
  • Make your compiler aware of the include/asap folder and include "asap.h" in your code
  • If using CMake you can add the project subdirectory and link against it using target_link_libraries
  • Use find_package if you installed ASAP using make install or any other method
  • Download the latest release which is a single asap.h file bundled with all the classes.

License

ASAP is MIT licensed.

ORG