New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nottimtam/console.js

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nottimtam/console.js

A tiny, dependency-less package for printing pretty, timestamped messages to the console.

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-50%
Maintainers
0
Weekly downloads
 
Created
Source

console.js

A tiny, dependency-less package for printing pretty, timestamped messages to the console.

Installation

npm i @nottimtam/console.js

Usage

ES6

import { log, warn, success } from "@nottimtam/console.js";

log("This is a regular log.");
warn("This is a warning.");
success("This is a success message!");

CJS

const { log, warn, success } = require("@nottimtam/console.js");

log("This is a regular log.");
warn("This is a warning.");
success("This is a success message!");

Reference

Several methods and resources are exposed by this package.

The log, warn, success, error, and info methods take a variable number of arguments and display them on the screen in a timestamped, color-coded format.

The bottom method does the same, but attempts to log the message at the very bottom of the console. This uses process.stdout and is not supported by all console systems.

The dateString method returns a formatted date string of the current date/time, in the same format used by the logging methods.

The colorReference object stores easy-to-use references for each color used in console logging in case more customization is needed.

Keywords

FAQs

Package last updated on 22 Aug 2024

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