Comparing version 0.1.0 to 0.1.1
0.1.1 / 2014-10-07 | ||
================== | ||
* package.json: Run npm init [stephenmathieson] | ||
* index: Fix variadic argument formatting [stephenmathieson] | ||
* remove delimiter when there are no arguments supplied [queckezz] | ||
* readme: correct module name [queckezz] | ||
0.1.0 / 2014-06-08 | ||
@@ -3,0 +11,0 @@ ================== |
23
index.js
@@ -18,3 +18,3 @@ | ||
* Initialize `Logger` | ||
* | ||
* | ||
* @param {Stream} stream | ||
@@ -32,8 +32,8 @@ * @api public | ||
* Add `type` with `color`. | ||
* | ||
* | ||
* Example: | ||
* | ||
* | ||
* logger.type('log', '36m'); | ||
* logger.log('woot %d', 9); | ||
* | ||
* | ||
* logger.type('error', '36m', function(){ | ||
@@ -43,5 +43,5 @@ * logger.end(); | ||
* }); | ||
* | ||
* | ||
* logger.error('%s', err.stack); | ||
* | ||
* | ||
* @param {String} type | ||
@@ -69,3 +69,3 @@ * @param {String} color | ||
* Log `type`, `color` with `args`. | ||
* | ||
* | ||
* @param {String} type | ||
@@ -80,3 +80,6 @@ * @param {String} color | ||
var pad = this.padleft(type); | ||
var msg = fmt.apply(null, ['%s\033[%s%s\033[m : %s', pad, color, type].concat(args)); | ||
var msg = '%s\033[%s%s\033[m'; | ||
if (args.length) msg += ' : '; | ||
msg = fmt(msg, pad, color, type); | ||
if (args.length) msg += fmt.apply(null, args); | ||
this.stream.write(msg); | ||
@@ -88,3 +91,3 @@ return this; | ||
* Pad `type` left. | ||
* | ||
* | ||
* @param {String} type | ||
@@ -102,3 +105,3 @@ * @return {String} | ||
* End. | ||
* | ||
* | ||
* @api public | ||
@@ -105,0 +108,0 @@ */ |
{ | ||
"name": "stream-log", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "a tiny stream logger.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "make test" | ||
}, | ||
"dependencies": { | ||
"max-component": "^1.0.0" | ||
}, | ||
"devDependencies": {} | ||
"devDependencies": { | ||
"better-assert": "^1.0.1", | ||
"istanbul": "^0.3.2", | ||
"mocha": "^1.21.4" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/yields/stream-log.git" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -9,3 +9,3 @@ | ||
```bash | ||
$ npm install stream-logger | ||
$ npm install stream-log | ||
``` | ||
@@ -12,0 +12,0 @@ |
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
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 License Found
License(Experimental) License information could not be found.
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
6411
8
0
180
0
3