{"dist":{"shasum":"2087167ca23799c42cd43c3fef74ddf6dd7cf11d","tarball":"https://registry.npmjs.org/buffered-writer/-/buffered-writer-0.2.1.tgz","integrity":"sha512-vkv+ixEzHXtREsueJnUuGXkEpuMtwxCmESvuY2sqvlwlSKXm0KBlCw2vcxjEvFD0mD7Gcco96dvd1WFKTeHJEg==","signatures":[{"sig":"MEUCIBNaaVE7cq/9PqHuc1cR9MJfqblYIs6QuHs8YvGJwi6GAiEAh0zBY4uoISO5s9SP8+84h7Odcb99j5FufVGbjmukKhQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"buffered-writer","name":"buffered-writer","author":{"name":"Gabriel Llamas","email":"gaglekas@gmail.com"},"readme":"buffered-writer\r\n===============\r\n\r\n_Node.js project_\r\n\r\n#### Writes buffered data ####\r\n\r\nVersion: 0.2.1\r\n\r\nNode.js streams are not buffered, that is, when you write data to them you're doing multiple I/O calls. This module buffers the data that has to be written to disk and eases the buffer manipulation when you need to write data from different nature (strings, numbers, arrays or buffers).\r\n\r\n#### Installation ####\r\n\r\n```\r\nnpm install buffered-writer\r\n```\r\n\r\n#### Example ####\r\n\r\n```javascript\r\nvar bw = require (\"buffered-writer\");\r\n\r\nbw.open (\"file\")\r\n\t.on (\"error\", function (error){\r\n\t\tconsole.log (error);\r\n\t})\r\n\t.write ([0x00, 0x01, 0x02]) //Writes: 0x00, 0x01, 0x02\r\n\t.write (new Buffer ([0x03, 0x04]), 1, 1) //Writes: 0x04\r\n\t.write (0x0506) //Writes: 0x05, 0x06\r\n\t.write (\"↑a\", 1) //Writes: a (0x61)\r\n\t.close ();\r\n```\r\n\r\n#### Methods ####\r\n\r\nWhen you call to `open()` a stream a `Writer` instance is returned. This object inherits from `EventEmitter` and wraps a `WriteStream`. Only an `error` event is emitted. When this ocurrs, the `Writer` is closed automatically, you don't need to close it explicitly (if you try to do so you'll get another error, you cannot close twice).\r\n\r\n- [bw.open(file[, settings])](#open)\r\n- [Writer#close([callback])](#close)\r\n- [Writer#line()](#line)\r\n- [Writer#write(buffer[, offset[, length]])](#write)\r\n\r\n<a name=\"open\"></a>\r\n__bw.open(file[, settings])__  \r\n\r\n\r\n<a name=\"close\"></a>\r\n__Writer#close([callback])__  \r\n\r\n\r\n<a name=\"line\"></a>\r\n__Writer#line()__  \r\n\r\n\r\n<a name=\"write\"></a>\r\n__Writer#write(buffer[, offset[, length]])__  \r\n","engines":{"node":"*"},"_npmUser":{"name":"Gagle","email":"gaglekas@gmail.com"},"keywords":["buffer","write","stream","file","binary","data"],"licenses":[{"url":"http://www.opensource.org/licenses/mit-license.html","type":"MIT"}],"deprecated":"DO NOT USE, DEPRECATED","repository":{"url":"git://github.com/Gagle/Node-BufferedWriter.git","type":"git"},"_npmVersion":"1.1.66","description":"Writes buffered data to files","directories":{},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}],"dependencies":{"errno-codes":"*"},"readmeFilename":"README.md","_id":"buffered-writer@0.2.1","version":"0.2.1"}