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

logging-helpers

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logging-helpers - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

63

index.js

@@ -7,16 +7,27 @@ 'use strict';

* ```js
* // Handlebars
* {{log "this is a message!"}}
*
* // Lo-Dash
* <%= log("this is a message!") %>
* <%= log("%j", foo) %>
*
* // Handlebars
* {{log "this is a message!"}}
* ```
*/
exports.log = function () {
exports.log = function log_() {
console.log.apply(console, arguments);
};
exports.info = function () {
/**
* ```js
* // Lo-Dash
* <%= info("this is a message!") %>
* <%= info("%j", foo) %>
*
* // Handlebars
* {{info "this is a message!"}}
* ```
*/
exports.info = function info_() {
arguments[0] = chalk.cyan(arguments[0]);

@@ -26,3 +37,14 @@ console.log.apply(console, arguments);

exports.bold = function () {
/**
* ```js
* // Lo-Dash
* <%= bold("this is a message!") %>
* <%= bold("%j", foo) %>
*
* // Handlebars
* {{bold "this is a message!"}}
* ```
*/
exports.bold = function bold_() {
arguments[0] = chalk.bold(arguments[0]);

@@ -32,3 +54,3 @@ console.log.apply(console, arguments);

exports.warn = function () {
exports.warn = function warn_() {
arguments[0] = chalk.yellow(arguments[0]);

@@ -38,3 +60,3 @@ console.warn.apply(console, arguments);

exports.error = function () {
exports.error = function error_() {
arguments[0] = chalk.red(arguments[0]);

@@ -44,9 +66,19 @@ console.error.apply(console, arguments);

exports.debug = function(val) {
/**
* Outputs a debug statement with the current context,
* and/or `val`
*/
exports.debug = function debug_(val) {
var args = [].slice.call(arguments);
console.log();
console.log('=================================');
console.log('context: ', this);
console.log('context: %j', this);
console.log();
if (!isUndefined(val)) {
console.log('value: ', val);
console.log.apply(console, ['value: %j'].concat(val));
}
console.log('=================================');
console.log();
return;

@@ -59,10 +91,7 @@ };

* passed on the context.
*
*/
exports._inspect = function(context, options) {
exports._inspect = function inspect_(context, options) {
context = JSON.stringify(context, null, 2);
var ext = options
&& options.hash
&& options.hash.ext || 'html';
var ext = options && options.hash && options.hash.ext || 'html';
return switchOutput(ext, context);

@@ -74,4 +103,2 @@ };

* extension passed.
*
* @api private
*/

@@ -78,0 +105,0 @@

{
"name": "logging-helpers",
"description": "Basic template helpers for printing messages out to the console. Useful for debugging context in templates. Should work with any template engine.",
"version": "0.3.0",
"version": "0.4.0",
"homepage": "https://github.com/helpers/logging-helpers",

@@ -19,4 +19,7 @@ "author": {

"type": "MIT",
"url": "https://github.com/helpers/logging-helpers/blob/master/LICENSE-MIT"
"url": "https://github.com/helpers/logging-helpers/blob/master/LICENSE"
},
"files": [
"index.js"
],
"main": "index.js",

@@ -27,8 +30,11 @@ "engines": {

"scripts": {
"test": "mocha -R spec"
"test": "mocha"
},
"dependencies": {
"chalk": "^1.0.0"
},
"devDependencies": {
"handlebars": "^2.0.0",
"mocha": "*",
"should": "*"
"handlebars": "^3.0.0",
"mocha": "^2.2.1",
"should": "^5.2.0"
},

@@ -55,6 +61,3 @@ "keywords": [

"verb"
],
"dependencies": {
"chalk": "^0.5.1"
}
}
]
}

@@ -1,6 +0,5 @@

# logging-helpers [![NPM version](https://badge.fury.io/js/logging-helpers.svg)](http://badge.fury.io/js/logging-helpers)
# logging-helpers [![NPM version](https://badge.fury.io/js/logging-helpers.svg)](http://badge.fury.io/js/logging-helpers) [![Build Status](https://travis-ci.org/helpers/logging-helpers.svg)](https://travis-ci.org/helpers/logging-helpers)
> Basic template helpers for printing messages out to the console. Useful for debugging context in templates. Should work with any template engine.
## Install with [npm](npmjs.org)

@@ -12,2 +11,5 @@

## Related helper projects
* [handlebars-helpers](https://github.com/assemble/handlebars-helpers): 120+ Handlebars helpers in ~20 categories, for Assemble, YUI, Ghost or any Handlebars project. Includes helpers like {{i18}}, {{markdown}}, {{relative}}, {{extend}}, {{moment}}, and so on.
* [template-helpers](https://github.com/jonschlinkert/template-helpers): Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or any engine that supports helper functions.

@@ -82,5 +84,3 @@ ## Usage examples

## Run tests
## Running tests
Install dev dependencies.

@@ -99,4 +99,4 @@

+ [github/helpers](https://github.com/helpers)
+ [twitter/helpers](http://twitter.com/helpers)
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

@@ -109,2 +109,2 @@ ## License

_This file was generated by [verb](https://github.com/assemble/verb) on January 20, 2015._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 20, 2015._
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