Comparing version 1.2.0 to 1.3.0
24
index.js
@@ -19,2 +19,23 @@ 'use strict'; | ||
function info(){ | ||
var time = getTimestamp(); | ||
process.stdout.write(time + ' '); | ||
console.info.apply(console, arguments); | ||
return this; | ||
} | ||
function dir(){ | ||
var time = getTimestamp(); | ||
process.stdout.write(time + ' '); | ||
console.dir.apply(console, arguments); | ||
return this; | ||
} | ||
function warn(){ | ||
var time = getTimestamp(); | ||
process.stderr.write(time + ' '); | ||
console.warn.apply(console, arguments); | ||
return this; | ||
} | ||
function error(){ | ||
@@ -28,2 +49,5 @@ var time = getTimestamp(); | ||
module.exports = log; | ||
module.exports.info = info; | ||
module.exports.dir = dir; | ||
module.exports.warn = warn; | ||
module.exports.error = error; |
{ | ||
"name": "fancy-log", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Log things, prefixed with a timestamp", | ||
"author": "Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com)", | ||
"contributors": [], | ||
"repository": "phated/fancy-log", | ||
"author": "Blaine Bublitz <blaine.bublitz@gmail.com>", | ||
"contributors": [ | ||
"Aman Mittal (http://amandeepmittal.github.io/)" | ||
], | ||
"repository": "js-cli/fancy-log", | ||
"license": "MIT", | ||
@@ -9,0 +11,0 @@ "engines": { |
@@ -30,7 +30,23 @@ # fancy-log | ||
Logs ths message as if you called `console.error` but prefixes the output with the | ||
Logs the message as if you called `console.error` but prefixes the output with the | ||
current time in HH:MM:ss format. | ||
### `log.warn(msg...)` | ||
Logs the message as if you called `console.warn` but prefixes the output with the | ||
current time in HH:MM:ss format. | ||
### `log.info(msg...)` | ||
Logs the message as if you called `console.info` but prefixes the output with the | ||
current time in HH:MM:ss format. | ||
### `log.dir(msg...)` | ||
Logs the message as if you called `console.dir` but prefixes the output with the | ||
current time in HH:MM:ss format. | ||
## License | ||
MIT |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
4273
44
52