{"_id":"squeak","_rev":"252094","name":"squeak","description":"A tiny stream log","dist-tags":{"latest":"1.3.0"},"maintainers":[{"name":"kevva","email":""}],"time":{"modified":"2021-06-03T16:15:21.000Z","created":"2014-11-24T13:29:20.439Z","1.3.0":"2015-10-20T11:21:16.945Z","1.2.1":"2015-10-12T14:00:18.843Z","1.2.0":"2014-11-24T19:49:24.969Z","1.1.0":"2014-11-24T15:22:38.562Z","1.0.0":"2014-11-24T13:29:20.439Z"},"users":{"timdp":true,"dofy":true,"gavinning":true},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"repository":{"type":"git","url":"git+https://github.com/kevva/squeak.git"},"versions":{"1.3.0":{"name":"squeak","version":"1.3.0","description":"A tiny stream log","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/squeak.git"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["log"],"dependencies":{"chalk":"^1.0.0","console-stream":"^0.1.1","lpad-align":"^1.0.1"},"devDependencies":{"ava":"^0.0.4"},"gitHead":"5fd68a6e256015bc2bed80a89047629fb6ebfd41","bugs":{"url":"https://github.com/kevva/squeak/issues"},"homepage":"https://github.com/kevva/squeak#readme","_id":"squeak@1.3.0","_shasum":"33045037b64388b567674b84322a6521073916c3","_from":".","_npmVersion":"3.3.3","_nodeVersion":"4.1.2","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"33045037b64388b567674b84322a6521073916c3","size":3017,"noattachment":false,"key":"/squeak/-/squeak-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/squeak/download/squeak-1.3.0.tgz"},"maintainers":[{"name":"kevva","email":""}],"directories":{},"publish_time":1445340076945,"_cnpm_publish_time":1445340076945,"_hasShrinkwrap":false},"1.2.1":{"name":"squeak","version":"1.2.1","description":"A tiny stream log","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/squeak.git"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["log"],"dependencies":{"chalk":"^1.0.0","lpad-align":"^1.0.1"},"devDependencies":{"ava":"^0.0.4"},"gitHead":"84b88401168b9794b35533fff40585150914d90e","bugs":{"url":"https://github.com/kevva/squeak/issues"},"homepage":"https://github.com/kevva/squeak#readme","_id":"squeak@1.2.1","_shasum":"dd011e6473a351aa58f8ddc2e90353ec3461141e","_from":".","_npmVersion":"3.3.3","_nodeVersion":"4.1.2","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"dd011e6473a351aa58f8ddc2e90353ec3461141e","size":2984,"noattachment":false,"key":"/squeak/-/squeak-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/squeak/download/squeak-1.2.1.tgz"},"maintainers":[{"name":"kevva","email":""}],"directories":{},"publish_time":1444658418843,"_cnpm_publish_time":1444658418843,"_hasShrinkwrap":false},"1.2.0":{"name":"squeak","version":"1.2.0","description":"A tiny stream log","license":"MIT","repository":{"type":"git","url":"https://github.com/kevva/squeak"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["log"],"dependencies":{"chalk":"^0.5.1","lpad-align":"^1.0.1"},"devDependencies":{"ava":"^0.0.4"},"gitHead":"2071b89c797614281b86aa6b7517dd01fd7f576b","bugs":{"url":"https://github.com/kevva/squeak/issues"},"homepage":"https://github.com/kevva/squeak","_id":"squeak@1.2.0","_shasum":"804801f1a7620c39620050d145c646a792c861c2","_from":".","_npmVersion":"2.1.7","_nodeVersion":"0.10.32","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"maintainers":[{"name":"kevva","email":""}],"dist":{"shasum":"804801f1a7620c39620050d145c646a792c861c2","size":2947,"noattachment":false,"key":"/squeak/-/squeak-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/squeak/download/squeak-1.2.0.tgz"},"directories":{},"publish_time":1416858564969,"_cnpm_publish_time":1416858564969,"_hasShrinkwrap":false},"1.1.0":{"name":"squeak","version":"1.1.0","description":"A tiny stream log","license":"MIT","repository":{"type":"git","url":"https://github.com/kevva/squeak"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["log"],"dependencies":{"chalk":"^0.5.1","lpad-align":"^1.0.1"},"devDependencies":{"ava":"^0.0.4"},"gitHead":"0409f9dc35b49c74b73f1fb649972a11dc569a7e","bugs":{"url":"https://github.com/kevva/squeak/issues"},"homepage":"https://github.com/kevva/squeak","_id":"squeak@1.1.0","_shasum":"440e6647f654383303ff7e34c7b4fee78d2e3ee4","_from":".","_npmVersion":"2.1.7","_nodeVersion":"0.10.32","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"maintainers":[{"name":"kevva","email":""}],"dist":{"shasum":"440e6647f654383303ff7e34c7b4fee78d2e3ee4","size":2817,"noattachment":false,"key":"/squeak/-/squeak-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/squeak/download/squeak-1.1.0.tgz"},"directories":{},"publish_time":1416842558562,"_cnpm_publish_time":1416842558562,"_hasShrinkwrap":false},"1.0.0":{"name":"squeak","version":"1.0.0","description":"A tiny stream log","license":"MIT","repository":{"type":"git","url":"https://github.com/kevva/squeak"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["log"],"dependencies":{"chalk":"^0.5.1","lpad-align":"^1.0.1"},"devDependencies":{"ava":"^0.0.4"},"gitHead":"977a86915c458f50d98d1af4175dcff720245bd5","bugs":{"url":"https://github.com/kevva/squeak/issues"},"homepage":"https://github.com/kevva/squeak","_id":"squeak@1.0.0","_shasum":"20b4949a35152d8ef2a7b1e58647a05ab2cdec49","_from":".","_npmVersion":"2.1.7","_nodeVersion":"0.10.32","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"maintainers":[{"name":"kevva","email":""}],"dist":{"shasum":"20b4949a35152d8ef2a7b1e58647a05ab2cdec49","size":2694,"noattachment":false,"key":"/squeak/-/squeak-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/squeak/download/squeak-1.0.0.tgz"},"directories":{},"publish_time":1416835760439,"_cnpm_publish_time":1416835760439,"_hasShrinkwrap":false}},"readme":"# squeak [![Build Status](http://img.shields.io/travis/kevva/squeak.svg?style=flat)](https://travis-ci.org/kevva/squeak)\n\n> A tiny stream log\n\n![](https://cloud.githubusercontent.com/assets/709159/5165451/f0ca124e-73e4-11e4-8a49-9e278b7aff16.png)\n\n\n## Install\n\n```\n$ npm install --save squeak\n```\n\n\n## Usage\n\n```js\nvar Squeak = require('squeak');\nvar log = new Squeak()\n\t.type('info')\n\t.type('success', {color: 'green'})\n\t.type('warn', {color: 'yellow'})\n\t.type('error', {color: 'red'}, function () {\n\t\tlog.end();\n\t\tprocess.exit(1);\n\t});\n\nlog.info('this is a info message');\nlog.success('this is a success message');\nlog.warn('this is a warning');\nlog.error(new Error('this is an error').stack);\n\n/*\n     info : this is a info message\n  success : this is a success message\n     warn : this is a warning\n    error : this is an error\n    at ChildProcess.exithandler (child_process.js:648:15)\n    at ChildProcess.emit (events.js:98:17)\n */\n```\n\nYou can also customize the different types to use a custom prefix using the \n`prefix` option:\n\n```js\nvar Squeak = require('squeak');\nvar log = new Squeak({separator: ' '})\n\t.type('success', {color: 'green', prefix: '✔'})\n\t.type('warn', {color: 'yellow', prefix: '⚠'});\n\nlog.success('this is a success message');\nlog.warn('this is a warning');\n\n/*\n  ✔ this is a success message\n  ⚠ this is a warning\n */\n```\n\n\n## API\n\n### new Squeak(options)\n\nCreates a new `Squeak` instance.\n\n#### options.align\n\nType: `boolean`  \nDefault: `true`\n\nWhether to align the prefixes or not. E.g:\n\n```sh\n     foo : hello\n  foobar : world\n```\n\n#### options.indent\n\nType: `number`  \nDefault: `2`\n\nSets the indentation.\n\n#### options.separator\n\nType: `string`  \nDefault: `  :  `\n\nCustomize the separator between the `prefix` and the message.\n\n#### options.stream\n\nType: `stream`  \nDefault: `process.stderr`\n\nWhich `stream` to write to.\n\n### .write(args)\n\nType: `string`\n\nWrites to `options.stream`, using `process.stderr` by default.\n\n### .writeln(args)\n\nType: `string`\n\nSame as `.write()` but with a new line.\n\n### .writelpad(args)\n\nType: `string`\n\nSame as `.write()` but with padding.\n\n### .type(type, options, callback)\n\nAdds a type.\n\n#### type\n\nType: `string`\n\nThe name of the type. Will be used as `prefix` by default.\n\n#### options.color\n\nType: `string`\n\nSets the prefix color. Supported colors can be found [here](https://github.com/sindresorhus/ansi-styles#colors).\n\n#### options.prefix\n\nType: `string`\n\nSets the `type` prefix. Uses `type` by default.\n\n#### callback\n\nType: `function`\n\nAn optional callback to be called when the `type` is called.\n\n### .emit(event, data)\n\nEmits an event.\n\n### .end(callback)\n\nType: `function`\n\nWrites a newline and executes an optional callback function.\n\n\n## License\n\nMIT © [Kevin Mårtensson](https://github.com/kevva)\n","_attachments":{},"homepage":"https://github.com/kevva/squeak#readme","bugs":{"url":"https://github.com/kevva/squeak/issues"},"license":"MIT"}