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

qc-log_api

v0.2.0

Published

API for Logging in JavaScript.

Readme

qc-log_api

Build Status Coverage Status License Downloads

npm badge

This project defines an API for a logging system in JavaScript. If you have ever used a logging system, then you are aware of its benefits over using something that simply prints to the console, standard out, or standard error. A logging system is configurable and allows one to determine which log messages are logged, where they are logged, and the format in which they are logged.

There are several logging systems available for the JavaScript environment and at the start of a project you may not be ready to spend the time on testing and choosing a particular logging system. This is where this logging API steps in. It has the minimal API typically used by most logging systems. By using this logging API now, it will be easier to upgrade to a full-blown logging system implementation that closely match this API.

Although this is designed to help enforce a particular logging API, it has a basic implementation which logs the messages to the console using the most appropriate method. For example, a WARN level message is logged to console.warn.

Installation

npm install --save qc-log_api

Usage

import * as printf from 'printf';

import { Log } from 'qc-log_api';

let LOG = Log.Factory.get('example');

LOG.trace('I am a %s level message', 'TRACE');
LOG.debug('I am a %s level message', 'DEBUG');
LOG.info('I am an %s level message', 'INFO');
LOG.warn('I am a %s level message', 'WARN');
LOG.error('I am an %s level message', 'ERROR');
LOG.fatal('I am a %s level message', 'FATAL');

LOG.trace(printf, 'I am a %s level message', 'TRACE');

let field_length_between = function (field_name, min_len, max_len) {
    return printf('%s must have a length between %d and %d.', field_name, min_len, max_len);
};
LOG.warn(field_length_between, 'Username', 3, 50);
LOG.warn(field_length_between, 'Password', 8, 20);

LOG.logAt(Log.Level.TRACE, '%s must have a length between %d and %d.', 'Password', 8, 20);
LOG.logAt(Log.Level.DEBUG, '%s must have a length between %d and %d.', 'Password', 8, 20);
LOG.logAt(Log.Level.INFO, '%s must have a length between %d and %d.', 'Password', 8, 20);
LOG.logAt(Log.Level.WARN, '%s must have a length between %d and %d.', 'Password', 8, 20);
LOG.logAt(Log.Level.ERROR, '%s must have a length between %d and %d.', 'Password', 8, 20);
LOG.logAt(Log.Level.FATAL, '%s must have a length between %d and %d.', 'Password', 8, 20);