{"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.2.0","homepage":"https://github.com/helpers/logging-helpers","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/helpers/logging-helpers.git"},"bugs":{"url":"https://github.com/helpers/logging-helpers/issues"},"licenses":[{"type":"MIT","url":"https://github.com/helpers/logging-helpers/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"chalk":"^0.5.1"},"devDependencies":{"handlebars":"^2.0.0","mocha":"*","should":"*"},"keywords":["assemble","dash","debug","docs","documentation","engine","generate","generator","handlebars","helper","helpers","inspect","lo","lo-dash","lodash","markdown","template","templates","verb"],"_id":"logging-helpers@0.2.0","_shasum":"8e06ecf7370b811e13cbceb0551ed644485a0d0a","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"8e06ecf7370b811e13cbceb0551ed644485a0d0a","tarball":"http://registry-npm.ywwl.com/logging-helpers/download/logging-helpers-0.2.0.tgz","integrity":"sha512-adCeK/MApw/st+4yyhrck5ayNbbKUs/Ha8AgeOJj4nWeNnjK+UP1aVROjZLW7flsLZpAVZ0QOKvbr3+bBiXNVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICTqHU/jo6ZngWcvLefPSJqTiUwDli4EYa+vwLZd1/o7AiEAtY8Ex5Cg25J0ViNngOGEt6AQW9vcAhS4QsmzFKxYJY0="}],"size":3811,"noattachment":false,"key":"/logging-helpers/-/logging-helpers-0.2.0.tgz"},"directories":{},"readme":"# logging-helpers [![NPM version](https://img.shields.io/npm/v/logging-helpers.svg?style=flat)](https://www.npmjs.com/package/logging-helpers) [![NPM monthly downloads](https://img.shields.io/npm/dm/logging-helpers.svg?style=flat)](https://npmjs.org/package/logging-helpers) [![NPM total downloads](https://img.shields.io/npm/dt/logging-helpers.svg?style=flat)](https://npmjs.org/package/logging-helpers) [![Linux Build Status](https://img.shields.io/travis/helpers/logging-helpers.svg?style=flat&label=Travis)](https://travis-ci.org/helpers/logging-helpers)\n\n> Basic template helpers for printing messages out to the console. Useful for debugging context in templates. Should work with any template engine.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save logging-helpers\n```\n\n## Usage\n\nThe main export is the `log` helper function with other helpers decorated as properties on this function. Some apps, like [assemble](https://github.com/assemble/assemble), [verb](https://github.com/verbose/verb) and [generate](https://github.com/generate/generate) support this format. However, a non-enumberalbe `toObject` method is exposed for registering directly with engines like [handlebars](http://www.handlebarsjs.com/)\n\nExample:\n\n```js\nvar loggingHelpers = require('logging-helpers');\nvar hbs = require('handlebars');\n\nhbs.registerHelper('log', helpers);\n// register all of the other helpers\nhbs.registerHelper(helpers.toObject);\n```\n\n## Template examples\n\nHandlebars:\n\n```handlebars\n{{log \"%s\" \"this is a message\"}}\n{{info \"%s\" \"this is a message\"}}\n{{warning \"%s\" \"this is a message\"}}\n{{warn \"%s\" \"this is a message\"}}  <!-- alias for \"warning\" -->\n{{success \"%s\" \"this is a message\"}}\n{{error \"%s\" \"this is a message\"}}\n{{danger \"%s\" \"this is a message\"}}  <!-- alias for \"error\" -->\n{{ok \"%s\" \"this is a message\"}}\n{{bold \"%s\" \"this is a message\"}}\n{{_debug this}}\n{{_inspect foo.bar}}\n```\n\nLo-Dash or Underscore:\n\n```html\n<%= log(\"%s\", \"this is a message\") %>\n<%= info(\"%s\", \"this is a message\") %>\n<%= warn(\"%s\", \"this is a message\") %>\n<%= warning(\"%s\", \"this is a message\") %>\n<%= error(\"%s\", \"this is a message\") %>\n<%= bold(\"%s\", \"this is a message\") %>\n<%= _debug(data) %>\n<%= _inspect(foo.bar) %>\n```\n\n[Verb](https://github.com/verbose/verb) (uses lodash-style templates, but with special delimiters to avoid delimiter collision in documentation):\n\n```js\n{%= log(\"%s\", \"this is a message\") %}\n{%= info(\"%s\", \"this is a message\") %}\n{%= bold(\"%s\", \"this is a message\") %}\n{%= warn(\"%s\", \"this is a message\") %}\n{%= error(\"%s\", \"this is a message\") %}\n{%= debug(data) %}\n{%= inspect(foo.bar) %}\n```\n\n## Usage with [assemble](https://github.com/assemble/assemble)\n\nThis should work with [assemble](https://github.com/assemble/assemble), [verb](https://github.com/verbose/verb), [generate](https://github.com/generate/generate), [update](https://github.com/update/update) or any application based on [templates](https://github.com/jonschlinkert/templates).\n\n```js\nvar helpers = require('logging-helpers');\nvar assemble = require('assemble');\nvar app = assemble();\napp.helpers(helpers);\n```\n\nYou can now use the helpers like this:\n\n```handlebars\n{{log \"%s\" \"this is a message\"}}\n{{info \"%s\" \"this is a message\"}}\n{{warning \"%s\" \"this is a message\"}}\n{{warn \"%s\" \"this is a message\"}}  <!-- alias for \"warning\" -->\n{{success \"%s\" \"this is a message\"}}\n{{error \"%s\" \"this is a message\"}}\n{{danger \"%s\" \"this is a message\"}}  <!-- alias for \"error\" -->\n{{ok \"%s\" \"this is a message\"}}\n{{bold \"%s\" \"this is a message\"}}\n{{_debug this}}\n{{_inspect foo.bar}}\n```\n\n## About\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 21, 2017._","publish_time":1418280258767,"_cnpm_publish_time":1418280258767,"dist-tags":{"latest":"1.0.0"}}