{"_id":"lazy-debug","_rev":"73698","name":"lazy-debug","description":"lazy-debug is a helper for visionmedia´s debug. It generates module identifiers based on filename, so your debug identifiers reflect the file structure automatically.","dist-tags":{"latest":"0.3.0"},"maintainers":[{"name":"apihlaja","email":"antti.pihlaja@live.fi"}],"time":{"modified":"2021-06-03T10:24:02.000Z","created":"2016-06-16T13:46:39.537Z","0.3.0":"2016-11-22T12:56:02.052Z","0.2.1":"2016-11-03T10:54:35.639Z","0.1.3":"2016-07-02T00:20:15.811Z","0.1.2":"2016-07-02T00:02:40.642Z","0.1.1":"2016-07-01T17:02:07.139Z","0.1.0":"2016-06-30T17:10:10.353Z","0.0.3":"2016-06-16T14:55:31.404Z","0.0.2":"2016-06-16T13:52:52.805Z","0.0.1":"2016-06-16T13:46:39.537Z"},"users":{},"author":{"name":"Antti Pihlaja"},"repository":{"type":"git","url":"git+https://github.com/apihlaja/lazy-debug.git"},"versions":{"0.3.0":{"name":"lazy-debug","version":"0.3.0","description":"lazy-debug is a helper for visionmedia´s debug. It generates module identifiers based on filename, so your debug identifiers reflect the file structure automatically.","main":"src/index.js","scripts":{"test":"run-s test:nodejs test:browserify test:webpack","test:nodejs":"mocha","test:browserify":"karma start ./test/karma.browserify.js","test:webpack":"karma start ./test/karma.webpack.js"},"repository":{"type":"git","url":"git+https://github.com/apihlaja/lazy-debug.git"},"keywords":["debug","webpack","browserify"],"author":{"name":"Antti Pihlaja"},"license":"MIT","peerDependencies":{"debug":"*"},"dependencies":{"detect-node":"2.0.3"},"devDependencies":{"browserify":"13.1.1","chai":"^3.5.0","karma":"1.3.0","karma-browserify":"5.1.0","karma-mocha":"1.3.0","karma-phantomjs-launcher":"1.0.2","karma-spec-reporter":"0.0.26","karma-webpack":"1.8.0","mocha":"^3.1.2","npm-run-all":"3.1.1","watchify":"3.7.0","webpack":"1.13.3"},"gitHead":"a24a974961d214dbd443fc4609f387767ba0cd5d","bugs":{"url":"https://github.com/apihlaja/lazy-debug/issues"},"homepage":"https://github.com/apihlaja/lazy-debug#readme","_id":"lazy-debug@0.3.0","_shasum":"cb835ee2c9d78ae53dac8ac74b2f4587df2d2d36","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"apihlaja","email":"antti.pihlaja@live.fi"},"dist":{"shasum":"cb835ee2c9d78ae53dac8ac74b2f4587df2d2d36","size":3624,"noattachment":false,"key":"/lazy-debug/-/lazy-debug-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lazy-debug/download/lazy-debug-0.3.0.tgz"},"maintainers":[{"name":"apihlaja","email":"antti.pihlaja@live.fi"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lazy-debug-0.3.0.tgz_1479819360033_0.9677117108367383"},"directories":{},"publish_time":1479819362052,"_cnpm_publish_time":1479819362052,"_hasShrinkwrap":false},"0.2.1":{"name":"lazy-debug","version":"0.2.1","description":"Generates module names for vision media's debug","main":"src/index.js","scripts":{"test":"mocha","print-test":"node scripts/print-test.js"},"repository":{"type":"git","url":"git+https://github.com/apihlaja/lazy-debug.git"},"keywords":["debug"],"author":{"name":"Antti Pihlaja"},"license":"MIT","peerDependencies":{"debug":"*"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"browserify":{"transform":[["babelify",{"presets":["es2015"]}]]},"gitHead":"a247b951b508779a787765c476596417c16b182d","bugs":{"url":"https://github.com/apihlaja/lazy-debug/issues"},"homepage":"https://github.com/apihlaja/lazy-debug#readme","_id":"lazy-debug@0.2.1","_shasum":"228e508c239b67318a5b0cff2ddd693c9f339ec7","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"apihlaja","email":"antti.pihlaja@live.fi"},"dist":{"shasum":"228e508c239b67318a5b0cff2ddd693c9f339ec7","size":3006,"noattachment":false,"key":"/lazy-debug/-/lazy-debug-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/lazy-debug/download/lazy-debug-0.2.1.tgz"},"maintainers":[{"name":"apihlaja","email":"antti.pihlaja@live.fi"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lazy-debug-0.2.1.tgz_1478170473402_0.01723334612324834"},"directories":{},"publish_time":1478170475639,"_cnpm_publish_time":1478170475639,"_hasShrinkwrap":false},"0.1.3":{"name":"lazy-debug","version":"0.1.3","description":"Generates module names for vision media's debug","main":"src/index.js","scripts":{"test":"mocha","print-test":"node scripts/print-test.js"},"repository":{"type":"git","url":"git+https://github.com/apihlaja/lazy-debug.git"},"keywords":["debug"],"author":{"name":"Antti Pihlaja"},"license":"MIT","peerDependencies":{"debug":"*"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"browserify":{"transform":[["babelify",{"presets":["es2015"]}]]},"gitHead":"af1051caa0f3a201ec6cf28fe8919871233bd4b0","bugs":{"url":"https://github.com/apihlaja/lazy-debug/issues"},"homepage":"https://github.com/apihlaja/lazy-debug#readme","_id":"lazy-debug@0.1.3","_shasum":"e052ef145337bb51471e05fd4bafc096ae794f30","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"apihlaja","email":"antti.pihlaja@live.fi"},"dist":{"shasum":"e052ef145337bb51471e05fd4bafc096ae794f30","size":4398,"noattachment":false,"key":"/lazy-debug/-/lazy-debug-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/lazy-debug/download/lazy-debug-0.1.3.tgz"},"maintainers":[{"name":"apihlaja","email":"antti.pihlaja@live.fi"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lazy-debug-0.1.3.tgz_1467418813610_0.7986287532839924"},"directories":{},"_resolved":"https://registry.npmjs.org/lazy-debug/-/lazy-debug-0.0.3.tgz","publish_time":1467418815811,"_cnpm_publish_time":1467418815811,"_hasShrinkwrap":false},"0.1.2":{"name":"lazy-debug","version":"0.1.2","description":"Generates module names for vision media's debug","main":"src/index.js","scripts":{"test":"mocha","print-test":"node scripts/print-test.js"},"repository":{"type":"git","url":"git+https://github.com/apihlaja/lazy-debug.git"},"keywords":["debug"],"author":{"name":"Antti Pihlaja"},"license":"MIT","peerDependencies":{"debug":"*"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"browserify":{"transform":[["babelify",{"presets":["es2015"]}]]},"gitHead":"af1051caa0f3a201ec6cf28fe8919871233bd4b0","bugs":{"url":"https://github.com/apihlaja/lazy-debug/issues"},"homepage":"https://github.com/apihlaja/lazy-debug#readme","_id":"lazy-debug@0.1.2","_shasum":"dff52af9e0d6b3a4014a296d0577f72adfc86fb6","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"apihlaja","email":"antti.pihlaja@live.fi"},"dist":{"shasum":"dff52af9e0d6b3a4014a296d0577f72adfc86fb6","size":4376,"noattachment":false,"key":"/lazy-debug/-/lazy-debug-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/lazy-debug/download/lazy-debug-0.1.2.tgz"},"maintainers":[{"name":"apihlaja","email":"antti.pihlaja@live.fi"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/lazy-debug-0.1.2.tgz_1467417758565_0.8890041538979858"},"directories":{},"_resolved":"https://registry.npmjs.org/lazy-debug/-/lazy-debug-0.0.3.tgz","publish_time":1467417760642,"_cnpm_publish_time":1467417760642,"_hasShrinkwrap":false},"0.1.1":{"name":"lazy-debug","version":"0.1.1","description":"Generates module names for vision media's debug","main":"src/index.js","scripts":{"test":"mocha","print-test":"node scripts/print-test.js"},"repository":{"type":"git","url":"git+https://github.com/apihlaja/lazy-debug.git"},"keywords":["debug"],"author":{"name":"Antti Pihlaja"},"license":"MIT","peerDependencies":{"debug":"*"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"browserify":{"transform":[["babelify",{"presets":["es2015"]}]]},"gitHead":"af1051caa0f3a201ec6cf28fe8919871233bd4b0","bugs":{"url":"https://github.com/apihlaja/lazy-debug/issues"},"homepage":"https://github.com/apihlaja/lazy-debug#readme","_id":"lazy-debug@0.1.1","_shasum":"4dd9421566fff20d069187b968ccff6a69cfa9fa","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"apihlaja","email":"antti.pihlaja@live.fi"},"dist":{"shasum":"4dd9421566fff20d069187b968ccff6a69cfa9fa","size":4364,"noattachment":false,"key":"/lazy-debug/-/lazy-debug-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/lazy-debug/download/lazy-debug-0.1.1.tgz"},"maintainers":[{"name":"apihlaja","email":"antti.pihlaja@live.fi"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lazy-debug-0.1.1.tgz_1467392524602_0.5822638154495507"},"directories":{},"_resolved":"https://registry.npmjs.org/lazy-debug/-/lazy-debug-0.0.3.tgz","publish_time":1467392527139,"_cnpm_publish_time":1467392527139,"_hasShrinkwrap":false},"0.1.0":{"name":"lazy-debug","version":"0.1.0","description":"Generates module names for vision media's debug","main":"src/index.js","scripts":{"test":"mocha","print-test":"node scripts/print-test.js"},"repository":{"type":"git","url":"git+https://github.com/apihlaja/lazy-debug.git"},"keywords":["debug"],"author":{"name":"Antti Pihlaja"},"license":"MIT","peerDependencies":{"debug":"*"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"browserify":{"transform":[["babelify",{"presets":["es2015"]}]]},"gitHead":"af1051caa0f3a201ec6cf28fe8919871233bd4b0","bugs":{"url":"https://github.com/apihlaja/lazy-debug/issues"},"homepage":"https://github.com/apihlaja/lazy-debug#readme","_id":"lazy-debug@0.1.0","_shasum":"6cc360ae9cce49c92a4394d6a3cc0e415e1f68ae","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.12.0","_npmUser":{"name":"apihlaja","email":"antti.pihlaja@live.fi"},"dist":{"shasum":"6cc360ae9cce49c92a4394d6a3cc0e415e1f68ae","size":4253,"noattachment":false,"key":"/lazy-debug/-/lazy-debug-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lazy-debug/download/lazy-debug-0.1.0.tgz"},"maintainers":[{"name":"apihlaja","email":"antti.pihlaja@live.fi"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lazy-debug-0.1.0.tgz_1467306607996_0.04450345132499933"},"directories":{},"_resolved":"https://registry.npmjs.org/lazy-debug/-/lazy-debug-0.0.3.tgz","publish_time":1467306610353,"_cnpm_publish_time":1467306610353,"_hasShrinkwrap":false},"0.0.3":{"name":"lazy-debug","version":"0.0.3","description":"Generates module names for vision media's debug","main":"src/index.js","scripts":{"test":"mocha","print-test":"node scripts/print-test.js"},"repository":{"type":"git","url":"git+https://github.com/apihlaja/lazy-debug.git"},"keywords":["debug"],"author":{"name":"Antti Pihlaja"},"license":"MIT","peerDependencies":{"debug":"*"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"gitHead":"af1051caa0f3a201ec6cf28fe8919871233bd4b0","bugs":{"url":"https://github.com/apihlaja/lazy-debug/issues"},"homepage":"https://github.com/apihlaja/lazy-debug#readme","_id":"lazy-debug@0.0.3","_shasum":"82cc2a6f4dcf36facf0c7a7946857bff62828ac7","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"apihlaja","email":"antti.pihlaja@live.fi"},"dist":{"shasum":"82cc2a6f4dcf36facf0c7a7946857bff62828ac7","size":3612,"noattachment":false,"key":"/lazy-debug/-/lazy-debug-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/lazy-debug/download/lazy-debug-0.0.3.tgz"},"maintainers":[{"name":"apihlaja","email":"antti.pihlaja@live.fi"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/lazy-debug-0.0.3.tgz_1466088930341_0.7004884697962552"},"directories":{},"publish_time":1466088931404,"_cnpm_publish_time":1466088931404,"_hasShrinkwrap":false},"0.0.2":{"name":"lazy-debug","version":"0.0.2","description":"Generates app & module names for vision media's debug","main":"src/index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/apihlaja/lazy-debug.git"},"keywords":["debug"],"author":{"name":"Antti Pihlaja"},"license":"MIT","peerDependencies":{"debug":"*"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"gitHead":"6108ff4d22d6fb4b15770a2f7b275643b10d5e97","bugs":{"url":"https://github.com/apihlaja/lazy-debug/issues"},"homepage":"https://github.com/apihlaja/lazy-debug#readme","_id":"lazy-debug@0.0.2","_shasum":"2bcd236574ab944a1b88a3667110578fe9447527","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"apihlaja","email":"antti.pihlaja@live.fi"},"dist":{"shasum":"2bcd236574ab944a1b88a3667110578fe9447527","size":3472,"noattachment":false,"key":"/lazy-debug/-/lazy-debug-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/lazy-debug/download/lazy-debug-0.0.2.tgz"},"maintainers":[{"name":"apihlaja","email":"antti.pihlaja@live.fi"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/lazy-debug-0.0.2.tgz_1466085171845_0.4774777088314295"},"directories":{},"publish_time":1466085172805,"_cnpm_publish_time":1466085172805,"_hasShrinkwrap":false},"0.0.1":{"name":"lazy-debug","version":"0.0.1","description":"Generates app & module names for vision media's debug","main":"src/index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"github.com/apihlaja/lazy-debug"},"keywords":["debug"],"author":{"name":"Antti Pihlaja"},"license":"MIT","peerDependencies":{"debug":"*"},"dependencies":{},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3"},"gitHead":"8daec815fc301cd39e7f0f7e2142c8bb7d6efa60","_id":"lazy-debug@0.0.1","_shasum":"2e486c0bda9c30cd650e81e1fc6609e00afc7511","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"apihlaja","email":"antti.pihlaja@live.fi"},"dist":{"shasum":"2e486c0bda9c30cd650e81e1fc6609e00afc7511","size":3471,"noattachment":false,"key":"/lazy-debug/-/lazy-debug-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/lazy-debug/download/lazy-debug-0.0.1.tgz"},"maintainers":[{"name":"apihlaja","email":"antti.pihlaja@live.fi"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lazy-debug-0.0.1.tgz_1466084797217_0.9061617983970791"},"directories":{},"publish_time":1466084799537,"_cnpm_publish_time":1466084799537,"_hasShrinkwrap":false}},"readme":"# lazy-debug\n\n[![Travis Build Status](https://travis-ci.org/apihlaja/lazy-debug.svg?branch=master)](https://travis-ci.org/apihlaja/lazy-debug) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/yihkfbm7e89h1ngf/branch/master?svg=true)](https://ci.appveyor.com/project/apihlaja/lazy-debug/branch/master)\n\n**lazy-debug** is a helper for [visionmedia´s debug](https://github.com/visionmedia/debug). It generates module identifiers based on `__filename`, so your debug identifiers reflect the file structure automatically.\n\n[![console log](https://raw.githubusercontent.com/apihlaja/lazy-debug/master/examples/express/output.png?raw=true)](https://github.com/apihlaja/lazy-debug/tree/master/examples/express)\n\nSupports\n\n  * Node.js v0.10 and later\n  * Windows and Linux\n  * Browserify\n  * Webpack\n\n## Install\n\n`npm install --save debug lazy-debug`\n\nThe module works out of the box in Node.js and Browserify environments. \n\n\n### Webpack\n\nWebpack needs [configuration](https://webpack.github.io/docs/configuration.html#node), include these in your `webpack.config.js`:\n\n```javascript\nconfig.node = {\n  __filename: true, // populates filenames relative to your app root\n  fs: \"empty\"       // include empty \"mock\" for fs module\n}\n```\n\n## Usage\n\nJust require it and provide filename:\n\n```javascript\nvar debug = require('lazy-debug')(__filename)\ndebug('ready for logging..')\n```\nDebugger identifier will be relative to module root, ie. something like `dir:file`. File extensions are omitted and file name is omitted if it´s `index`.\n\n\n### Suffix\n\nAdd suffix by providing `submoduleName`:\n\n```javascript\nvar debug = require('lazy-debug')(__filename, {submoduleName: 'sub'})\nvar debug = require('lazy-debug')(__filename, 'sub')\n```\nDebugger identifier will be `dir:file:sub`.\n\n\n### Prefix\n\nAdd prefix by providing `packageName`:\n\n```javascript\nvar debug = require('lazy-debug')(__filename, {packageName: 'my-lib'})\nvar debug = require('lazy-debug')(__filename, {packageName: true})\n```\n\nDebugger identifier will be `my-lib:dir:file`. If package name is boolean `true`, name from `package.json` is used. That works only in Node.js environment.\n\n\n## Tests\n\n`npm test`\n\nTests node.js compability by running vanilla [Mocha](https://mochajs.org/) at first, then Browserify and Webpack builds are tested in [PhantomJS](http://phantomjs.org/) using [Karma](http://karma-runner.github.io/).\n\n\n## License\n\n[The MIT License](LICENSE.md)\n","_attachments":{},"homepage":"https://github.com/apihlaja/lazy-debug#readme","bugs":{"url":"https://github.com/apihlaja/lazy-debug/issues"},"license":"MIT"}