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

green-jay

v1.0.3

Published

A Javascript Logger.

Readme

Green-Jay

A Javascript Logger.

Installing

$ npm install green-jay

Usage

// parameters are optional.
// without options, logger will just log on console.
greenjay.createLogger({
    outputType: 'json',
    modifiers: {
        date:{
            color: '#069'
        },
        message: {
            modify: 'underline'
        }
    },
    logs: [
        new greenjay.logger({
            filePath: './logs/errors.log',
            minLevel: 'error'
        })
    ]
});

Logging

All functions

    greenjay.emergency('Some Emergency');
    greenjay.alert('Some Alert');
    greenjay.critical('Some Critical');
    greenjay.error('Some Error');
    greenjay.warning('Some Warning');
    greenjay.info('Some Info');
    greenjay.debug('Some Debug');
    greenjay.trivial('Some Trivial');

Labels

// can give a label to it too..
greenjay.alert('PANIC!!', 'remember to panic.');

Levels


From the most important to least.

Level | Name --- | --- 1 | Emergency 2 | Alert 3 | Critical 4 | Error 5 | Warning 6 | Info 7 | Debug 8 | Trivial

Options, Modifiers and Logs


Options

Name | Type | Default | Description --- | --- | --- | --- useConsole | boolean | true | Defines Should Logger Prints to Console. outputType | string | text | Defines Output Type. - 'text' or 'json' defaultLevelColors | boolean | true | Disables/Enables Default Level Colors Default Colors of Levels stopProgramAbove | string | Does Not Stop Program | Stops Program If Selected Level and Above Occurs. modify | object | Default Settings. | more info about modify logs | object | No Log Writing to File. | more info about logs

Modifiers

Name | Type | Default --- | --- | --- | date | object | empty date color | string | white date modify | string | nothing date bg | string | nothing message | object | empty message color | string | white message modify | string | nothing message bg | string | nothing level | object | empty level color | string | white level modify | string | nothing level bg | string | nothing

Logs

Name | Type | Default | Description --- | --- | --- | --- | filePath | string | no default | Path to Log File. If Includes Folder Path, It Will Create If It Doesn't Exist. minLevel | string | no default | Logs Entered Minimum Level and Above of It.

Colors


Valid Color Keywords

Accepts Hex and RGB values

    #abc426
    (150,123,77)

Color Names for Text Color or Background Color.

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • gray
  • redbright
  • greenbright
  • yellowbright
  • bluebright
  • magentabright
  • cyanbright
  • whitebright

Default Level Colors

Level | Name | Default Color --- | --- | --- 1 | Emergency | #e0f795 2 | Alert | #ef9c24 3 | Critical | #ef4824 4 | Error | #ef2424 5 | Warning | #efb424 6 | Info | #2f89f5 7 | Debug | #34ed72 8 | Trivial | #ffffff

Valid Modifiers


  • bold
  • underline

Stoping Program


You can stop program if given level and above logging occurs.

Example :

options.stopProgramAbove = 'error'

if emergency or critical or error logging happens logger will log it and closes the program.

Licence

MIT