Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

torch

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

torch - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

2

package.json
{
"name":"torch",
"description":"CLI logger with colors and deep inspection.",
"version":"0.2.2",
"version":"0.2.3",
"homepage":"http://github.com/TorchlightSoftware/torch",

@@ -6,0 +6,0 @@ "repository":"git://github.com/TorchlightSoftware/torch.git",

# Torch
Shed some light on the dark morass that is your code. A logger with colors and deep inspection.
Shed some light on the dark morass that is your code.
Torch is a logger with three primary functions:
* supports colors
* automatically runs util.inspect on all arguments, showing nested object/array contents
* can be used to show elapsed time
## Basic Usage
```javascript

@@ -15,2 +23,21 @@ log = require('torch');

## Showing Elapsed Time
This can be helpful in identifying slow areas of code, or in running benchmarks. You can utilize your existing log statements, and just enable elapsed time printouts.
```javascript
logger.toggleElapsed();
second = function() {logger.yellow('initiate launch sequence');};
third = function() {logger.white('begin countdown');};
logger.blue('clear the area');
setTimeout(second, 30);
setTimeout(third, 70);
// 0 ms: clear the area
// 32 ms: initiate launch sequence
// 39 ms: begin countdown
```
Torch uses Chalk. For a full list of supported colors, see Chalk's readme: https://github.com/sindresorhus/chalk

@@ -17,0 +44,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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