{"_id":"log-events","_rev":"96231","name":"log-events","description":"Create custom, chainable logging methods that emit log events when called.","dist-tags":{"latest":"0.4.0"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:32:09.000Z","created":"2016-02-22T20:52:46.509Z","0.4.0":"2016-09-19T00:47:28.667Z","0.3.0":"2016-03-05T17:03:22.166Z","0.2.2":"2016-02-23T02:07:54.972Z","0.2.1":"2016-02-23T01:23:20.578Z","0.2.0":"2016-02-22T21:53:10.867Z","0.1.1":"2016-02-22T21:19:18.024Z","0.1.0":"2016-02-22T20:52:46.509Z"},"users":{},"author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/doowb/log-events.git"},"versions":{"0.4.0":{"name":"log-events","description":"Create custom, chainable logging methods that emit log events when called.","version":"0.4.0","homepage":"https://github.com/doowb/log-events","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/doowb/log-events.git"},"bugs":{"url":"https://github.com/doowb/log-events/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=5.0"},"scripts":{"test":"mocha"},"dependencies":{"component-emitter":"^1.2.1","define-property":"^0.2.5","extend-shallow":"^2.0.1","falsey":"^0.3.0","get-value":"^2.0.6","lazy-cache":"^2.0.1","set-value":"^0.4.0","union-value":"^0.2.3","use":"^2.0.0"},"devDependencies":{"ansi-bold":"^0.1.1","ansi-underline":"^0.1.1","capture-stream":"^0.1.2","gulp":"^3.9.1","gulp-eslint":"^3.0.1","gulp-format-md":"^0.1.10","gulp-istanbul":"^1.1.1","gulp-mocha":"^3.0.1","is-enabled":"^0.1.0","minimist":"^1.2.0","mocha":"^3.0.2","strip-color":"^0.1.0"},"keywords":["console","console-log","debug","debugging","emit","emitter","emitting","error","event","events","log","logger","logging","logs","messages","verbalize","verbose","write","writing"],"verb":{"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["falsey","is-enabled","verbalize"]},"reflinks":["verb","verb-generate-readme"]},"gitHead":"fac39ec341164ceb28f49466990f58b1ad4b3016","_id":"log-events@0.4.0","_shasum":"c026a38d4a42f06b3b2aec0d011643cd4e12fcde","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c026a38d4a42f06b3b2aec0d011643cd4e12fcde","size":8673,"noattachment":false,"key":"/log-events/-/log-events-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/log-events/download/log-events-0.4.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/log-events-0.4.0.tgz_1474246046664_0.7535694900434464"},"directories":{},"publish_time":1474246048667,"_cnpm_publish_time":1474246048667,"_hasShrinkwrap":false},"0.3.0":{"name":"log-events","description":"Create custom, chainable logging methods that emit log events when called.","version":"0.3.0","homepage":"https://github.com/doowb/log-events","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/doowb/log-events.git"},"bugs":{"url":"https://github.com/doowb/log-events/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=5.0"},"scripts":{"test":"mocha"},"devDependencies":{"ansi-bold":"^0.1.1","ansi-underline":"^0.1.1","capture-stream":"^0.1.2","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","is-enabled":"^0.1.0","minimist":"^1.2.0","mocha":"*","should":"*","strip-color":"^0.1.0"},"keywords":["console","console-log","debug","debugging","emit","emitter","emitting","error","event","events","log","logger","logging","logs","messages","verbalize","verbose","write","writing"],"dependencies":{"component-emitter":"^1.2.0","define-property":"^0.2.5","extend-shallow":"^2.0.1","falsey":"^0.3.0","get-value":"^2.0.3","lazy-cache":"^1.0.3","set-value":"^0.3.3","union-value":"^0.2.3","use":"^1.1.2"},"verb":{"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["falsey","is-enabled","verbalize"]}},"gitHead":"7179a7a610ee55749f6d7914a346370e700411a3","_id":"log-events@0.3.0","_shasum":"288d641379b819b07dc1814bb8c8245730816b34","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.1.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"288d641379b819b07dc1814bb8c8245730816b34","size":8524,"noattachment":false,"key":"/log-events/-/log-events-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/log-events/download/log-events-0.3.0.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/log-events-0.3.0.tgz_1457197398889_0.18232300248928368"},"directories":{},"publish_time":1457197402166,"_cnpm_publish_time":1457197402166,"_hasShrinkwrap":false},"0.2.2":{"name":"log-events","description":"Create custom, chainable logging methods that emit log events when called.","version":"0.2.2","homepage":"https://github.com/doowb/log-events","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/doowb/log-events.git"},"bugs":{"url":"https://github.com/doowb/log-events/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"ansi-bold":"^0.1.1","ansi-underline":"^0.1.1","capture-stream":"^0.1.2","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","is-enabled":"^0.1.0","minimist":"^1.2.0","mocha":"*","should":"*","strip-color":"^0.1.0"},"keywords":["console","console-log","debug","debugging","emit","emitter","emitting","error","event","events","log","logger","logging","logs","messages","verbalize","verbose","write","writing"],"dependencies":{"component-emitter":"^1.2.0","define-property":"^0.2.5","extend-shallow":"^2.0.1","falsey":"^0.3.0","get-value":"^2.0.3","lazy-cache":"^1.0.3","set-value":"^0.3.3","union-value":"^0.2.3","use":"^1.1.2"},"verb":{"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["falsey","is-enabled","verbalize"]}},"gitHead":"959a00a62dd583aec768fe4192bd3bf9fa2e1277","_id":"log-events@0.2.2","_shasum":"24f3ee09a52033045d77937b2c3fb656c228f945","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.1.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"24f3ee09a52033045d77937b2c3fb656c228f945","size":8584,"noattachment":false,"key":"/log-events/-/log-events-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/log-events/download/log-events-0.2.2.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/log-events-0.2.2.tgz_1456193269436_0.9657119128387421"},"directories":{},"publish_time":1456193274972,"_cnpm_publish_time":1456193274972,"_hasShrinkwrap":false},"0.2.1":{"name":"log-events","description":"Create custom, chainable logging methods that emit log events when called.","version":"0.2.1","homepage":"https://github.com/doowb/log-events","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/doowb/log-events.git"},"bugs":{"url":"https://github.com/doowb/log-events/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"ansi-bold":"^0.1.1","ansi-underline":"^0.1.1","capture-stream":"^0.1.2","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","is-enabled":"^0.1.0","minimist":"^1.2.0","mocha":"*","should":"*","strip-color":"^0.1.0"},"keywords":["console","console-log","debug","debugging","emit","emitter","emitting","error","event","events","log","logger","logging","logs","messages","verbalize","verbose","write","writing"],"dependencies":{"component-emitter":"^1.2.0","define-property":"^0.2.5","extend-shallow":"^2.0.1","falsey":"^0.3.0","get-value":"^2.0.3","lazy-cache":"^1.0.3","set-value":"^0.3.3","union-value":"^0.2.3","use":"^1.1.2"},"verb":{"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["falsey","is-enabled","verbalize"]}},"gitHead":"a30d2a5e9f1a738e5624d8d8bfd133dc3395a6b7","_id":"log-events@0.2.1","_shasum":"5fcf8ba94345304e766fa8e6f5b9b9d01b62b520","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.1.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"5fcf8ba94345304e766fa8e6f5b9b9d01b62b520","size":8234,"noattachment":false,"key":"/log-events/-/log-events-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/log-events/download/log-events-0.2.1.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/log-events-0.2.1.tgz_1456190595833_0.5691705362405628"},"directories":{},"publish_time":1456190600578,"_cnpm_publish_time":1456190600578,"_hasShrinkwrap":false},"0.2.0":{"name":"log-events","description":"Create custom, chainable logging methods that emit log events when called.","version":"0.2.0","homepage":"https://github.com/doowb/log-events","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/doowb/log-events.git"},"bugs":{"url":"https://github.com/doowb/log-events/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"ansi-bold":"^0.1.1","ansi-underline":"^0.1.1","capture-stream":"^0.1.2","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","is-enabled":"^0.1.0","minimist":"^1.2.0","mocha":"*","should":"*","strip-color":"^0.1.0"},"keywords":["console","console-log","debug","debugging","emit","emitter","emitting","error","event","events","log","logger","logging","logs","messages","verbalize","verbose","write","writing"],"dependencies":{"component-emitter":"^1.2.0","define-property":"^0.2.5","extend-shallow":"^2.0.1","falsey":"^0.3.0","get-value":"^2.0.3","lazy-cache":"^1.0.3","set-value":"^0.3.3","union-value":"^0.2.3","use":"^1.1.2"},"verb":{"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["falsey","is-enabled","verbalize"]}},"gitHead":"bddf27d9cc790dddb132cb0505d415b40c485550","_id":"log-events@0.2.0","_shasum":"6ff9d420e96140c79a843984630122902ca8c412","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.1.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"6ff9d420e96140c79a843984630122902ca8c412","size":8206,"noattachment":false,"key":"/log-events/-/log-events-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/log-events/download/log-events-0.2.0.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/log-events-0.2.0.tgz_1456177987536_0.1774223237298429"},"directories":{},"publish_time":1456177990867,"_cnpm_publish_time":1456177990867,"_hasShrinkwrap":false},"0.1.1":{"name":"log-events","description":"Create custom, chainable logging methods that emit log events when called.","version":"0.1.1","homepage":"https://github.com/doowb/log-events","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/doowb/log-events.git"},"bugs":{"url":"https://github.com/doowb/log-events/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"ansi-bold":"^0.1.1","ansi-underline":"^0.1.1","capture-stream":"^0.1.2","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","is-enabled":"^0.1.0","minimist":"^1.2.0","mocha":"*","should":"*","strip-color":"^0.1.0"},"keywords":["console","console-log","debug","debugging","emit","emitter","emitting","error","event","events","log","logger","logging","logs","messages","verbalize","verbose","write","writing"],"dependencies":{"component-emitter":"^1.2.0","define-property":"^0.2.5","extend-shallow":"^2.0.1","falsey":"^0.3.0","get-value":"^2.0.3","lazy-cache":"^1.0.3","set-value":"^0.3.3","union-value":"^0.2.3","use":"^1.1.2"},"verb":{"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["falsey","is-enabled","verbalize"]}},"gitHead":"a739e4fdd08e4bbefa06f07a681692ed272d9da7","_id":"log-events@0.1.1","_shasum":"84b23b9146db34bb8239cc2dd8b345fbb239032a","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.1.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"84b23b9146db34bb8239cc2dd8b345fbb239032a","size":8123,"noattachment":false,"key":"/log-events/-/log-events-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/log-events/download/log-events-0.1.1.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/log-events-0.1.1.tgz_1456175954678_0.12240268150344491"},"directories":{},"publish_time":1456175958024,"_cnpm_publish_time":1456175958024,"_hasShrinkwrap":false},"0.1.0":{"name":"log-events","description":"Create custom, chainable logging methods that emit log events when called.","version":"0.1.0","homepage":"https://github.com/doowb/log-events","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/doowb/log-events.git"},"bugs":{"url":"https://github.com/doowb/log-events/issues"},"license":"MIT","files":["index.js","lib"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"ansi-bold":"^0.1.1","ansi-underline":"^0.1.1","capture-stream":"^0.1.2","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","is-enabled":"^0.1.0","minimist":"^1.2.0","mocha":"*","should":"*","strip-color":"^0.1.0"},"keywords":["console","console-log","debug","debugging","emit","emitter","emitting","error","event","events","log","logger","logging","logs","messages","verbalize","verbose","write","writing"],"dependencies":{"component-emitter":"^1.2.0","define-property":"^0.2.5","extend-shallow":"^2.0.1","falsey":"^0.3.0","get-value":"^2.0.3","lazy-cache":"^1.0.3","set-value":"^0.3.3","union-value":"^0.2.3","use":"^1.1.2"},"verb":{"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["falsey","is-enabled","verbalize"]}},"gitHead":"60db81116b3ab979ddbc0d814e16b43bd227739a","_id":"log-events@0.1.0","_shasum":"3ce22f16270d847fb19bbbc3a42c74699e6cdada","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.1.1","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"3ce22f16270d847fb19bbbc3a42c74699e6cdada","size":8128,"noattachment":false,"key":"/log-events/-/log-events-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/log-events/download/log-events-0.1.0.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/log-events-0.1.0.tgz_1456174361717_0.5752077307552099"},"directories":{},"publish_time":1456174366509,"_cnpm_publish_time":1456174366509,"_hasShrinkwrap":false}},"readme":"# log-events [![NPM version](https://img.shields.io/npm/v/log-events.svg?style=flat)](https://www.npmjs.com/package/log-events) [![NPM downloads](https://img.shields.io/npm/dm/log-events.svg?style=flat)](https://npmjs.org/package/log-events) [![Build Status](https://img.shields.io/travis/doowb/log-events.svg?style=flat)](https://travis-ci.org/doowb/log-events)\n\n> Create custom, chainable logging methods that emit log events when called.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save log-events\n```\n\n## Usage\n\n### [Logger](index.js#L23)\n\nCreate a new `Logger` constructor to allow\nupdating the prototype without affecting other contructors.\n\n### [._emit](index.js#L82)\n\nFactory for emitting log messages. This method is called internally for any emitter or mode method that is called as a function. To listen for events, listen for the emitter name or `'log'` when a mode is called as a method.\n\nWildcard `*` may also be listened for and will get 2 arguments `(name, stats)` where\n`name` is the emitter that was emitted and `stats` is the stats object for that event.\n\n**Params**\n\n* `name` **{String}**: the name of the emitter event to emit. Example: `info`\n* `message` **{String}**: Message intended to be emitted.\n* `returns` **{Object}** `Logger`: for chaining\n\n**Events**\n\n* `emits`: `*` Wildcard emitter that emits the emitter event name and stats object.\n* `emits`: `stats` Emitter that emits the stats object for the specified name.\n\n**Example**\n\n```js\n// emit `info` when `info` is an emitter method\nlogger.info('message');\n\n// emit `log` when `verbose` is a mode method\nlogger.verbose('message');\n\n// listen for all events\nlogger.on('*', function(name, stats) {\n  console.log(name);\n  //=> info\n});\n\nlogger.info('message');\n```\n\n### [.emitter](index.js#L127)\n\nAdd an emitter method to emit an event with the given `name`.\n\n**Params**\n\n* `name` **{String}**: the name of the emitter event to emit.\n* `level` **{Number}**: Priority level of the emitter. Higher numbers are less severe. (Default: 100)\n* `fn` **{Function}**: Optional emitter function that can be used to modify an emitted message. Function may be an existing style function.\n* `returns` **{Object}** `this`: for chaining\n\n**Events**\n\n* `emits`: `emitter` Emits name and new emitter instance after adding the emitter method.\n\n**Example**\n\n```js\n// add a default `write` emitter\nlogger.emitter('write');\n\n// add some styles\nlogger.style('red', function(msg) {\n  return colors.red(msg);\n});\nlogger.style('cyan', function(msg) {\n  return colors.cyan(msg);\n});\n\n// add an `info` logger that colors the msg cyan\nlogger.emitter('info', logger.cyan);\n\n// use the loggers:\nlogger.red.write('this is a red message');\nlogger.info('this is a cyan message');\n```\n\n### [.mode](index.js#L173)\n\nAdd arbitrary modes to be used for creating namespaces for emitter methods.\n\n**Params**\n\n* `mode` **{String}**: Mode to add to the logger.\n* `options` **{Object}**: Options to describe the mode.\n* `options.type` **{String|Array}**: Type of mode being created. Defaults to `mode`. Valid values are `['mode', 'toggle']`. `toggle` mode may be used to indicate a \"flipped\" state for another mode. e.g. `not.verbose`. `toggle` modes may not be used directly for emitting log events.\n* `fn` **{Function}**: Optional style function that can be used to stylize an emitted message.\n* `returns` **{Object}** `this`: for chaining\n\n**Events**\n\n* `emits`: `mode` Emits the name and new mode instance after adding the mode method.\n\n**Example**\n\n```js\n// create a simple `verbose` mode\nlogger.mode('verbose');\n\n// create a `not` toggle mode\nlogger.mode('not', {type: 'toggle'});\n\n// create a `debug` mode that modifies the message\nlogger.mode('debug', function(msg) {\n  return '[DEBUG]: ' + msg;\n});\n\n// use the modes with styles and emitters from above:\nlogger.verbose.red.write('write a red message when verbose is true');\nlogger.not.verbose.info('write a cyan message when verbose is false');\nlogger.debug('write a message when debug is true');\n```\n\n### [.style](index.js#L193)\n\nCreate a logger `style` with the given `fn`.\n\n**Params**\n\n* `style` **{String}**: The name of the style to create.\n* `fn` **{Function}**\n* `returns` **{Object}**: Returns the instance for chaining.\n\n**Events**\n\n* `emits`: `style`\n\n### [Mode](lib/mode.js#L18)\n\nMode constructor for making a mode object when\na mode is created with `logger.mode()`\n\n**Params**\n\n* `options` **{Object}**: Options to configure the mode.\n* `options.name` **{String}**: Required name of the mode\n* `options.type` **{String|Type}**: Type of mode to create. Defaults to `mode`. Values may be `['mode', 'toggle']`.\n\n### [type](lib/mode.js#L45)\n\nType of `mode`. Valid types are ['mode', 'toggle']\n\n**Example**\n\n```js\nconsole.log(verbose.type);\n//=> \"mode\"\nconsole.log(not.type);\n//=> \"toggle\"\n```\n\n### [name](lib/mode.js#L71)\n\nReadable name of `mode`.\n\n**Example**\n\n```js\nconsole.log(verbose.name);\n//=> \"verbose\"\nconsole.log(not.name);\n//=> \"not\"\n```\n\n### [fn](lib/mode.js#L99)`fn`\n\nOptional modifier function that accepts a value and returns a modified value. When not present, an identity function is used to return the original value.\n\n**Example**\n\n```js\nvar msg = \"some error message\";\n\n// wrap message in ansi codes for \"red\"\nmsg = red.fn(msg);\nconsole.log(msg);\n\n//=> \"\\u001b[31msome error message\\u001b[39m\";\n```\n\n### [Stats](lib/stats.js#L33)\n\nStats contructor that contains information about a chained event being built up.\n\n**Params**\n\n* `parent` **{Object}**: Optional stats instance to inherit `modes` and `styles` from.\n\n**Example**\n\n```js\n{\n  // \"not\" => toggle, \"verbose\" => mode\n  modes: ['not', 'verbose'],\n\n  // \"red\" => modifier\n  styles: ['red'],\n\n  // specified when emitter is created\n  level: 1,\n\n  // name of emitter that will trigger an event\n  // in this case \"red\" will not trigger an event\n  name: 'subhead',\n\n  // arguments passed into emitter function \"subhead\"\n  args: ['foo', 'bar', 'baz']\n}\n```\n\n### [.addMode](lib/stats.js#L82)\n\nAdd a mode to the `modes` array for this stats object.\n\n**Params**\n\n* `mode` **{Object}**: Instance of a Mode to add to the stats object.\n* `returns` **{Object}** `this`: for chaining.\n\n**Example**\n\n```js\nvar verbose = new Mode({name: 'verbose'});\nstats.addMode(verbose);\n```\n\n### [.getModes](lib/stats.js#L103)\n\nGet the array of modes from the stats object. Optionally, pass a property in and return an array with only the property.\n\n**Params**\n\n* `prop` **{String}**: Optional property to pick from the mode objects to return.\n* `returns` **{Array}**: Array of modes or mode properties.\n\n**Example**\n\n```js\nvar modes = stats.getModes();\n//=> [{name: 'verbose'}]\nvar modeNames = stats.getModes('name');\n//=> ['verbose']\n```\n\n### [.addStyle](lib/stats.js#L122)\n\nAdd a style to the `styles` array for this stats object.\n\n**Params**\n\n* `style` **{String}**: Name of style to add.\n* `returns` **{Object}** `this`: for chaining.\n\n**Example**\n\n```js\nstats.addStyle('red');\n```\n\n### [.addEmitter](lib/stats.js#L139)\n\nSets the emitter for this stats object to indicate this is a complete stats object ready to be emitted.\n\n**Params**\n\n* `emitter` **{Object}**: Instance of a Emitter to add to the stats object.\n* `returns` **{Object}** `this`: for chaining.\n\n**Example**\n\n```js\nvar info = new Emitter({name: 'info'});\nstats.addEmitter(info);\n```\n\n## About\n\n### Related projects\n\n* [falsey](https://www.npmjs.com/package/falsey): Returns true if `value` is falsey. Works for strings, arrays and `arguments` objects with a… [more](https://github.com/jonschlinkert/falsey) | [homepage](https://github.com/jonschlinkert/falsey \"Returns true if `value` is falsey. Works for strings, arrays and `arguments` objects with a length of `0`, and objects with no own enumerable properties are considered falsey.\")\n* [is-enabled](https://www.npmjs.com/package/is-enabled): Using key paths that may contain \"falsey\" patterns, check if a property on an object… [more](https://github.com/doowb/is-enabled) | [homepage](https://github.com/doowb/is-enabled \"Using key paths that may contain \"falsey\" patterns, check if a property on an object is enabled.\")\n* [verbalize](https://www.npmjs.com/package/verbalize): A pluggable logging utility with built-in colors, styles, and modes. | [homepage](https://github.com/jonschlinkert/verbalize \"A pluggable logging utility with built-in colors, styles, and modes.\")\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 document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_\n\nTo generate the readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install -g verb verb-generate-readme && verb\n```\n\n### Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n### Author\n\n**Brian Woodward**\n\n* [github/doowb](https://github.com/doowb)\n* [twitter/doowb](http://twitter.com/doowb)\n\n### License\n\nCopyright © 2016, [Brian Woodward](https://github.com/doowb).\nReleased under the [MIT license](https://github.com/doowb/log-events/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on September 18, 2016._","_attachments":{},"homepage":"https://github.com/doowb/log-events","bugs":{"url":"https://github.com/doowb/log-events/issues"},"license":"MIT"}