Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

management of modules

  • Loading branch information...
commit 397add04cfb4317934689f9a0cd2e0c6b53dc829 1 parent b145ae6
@gagle authored
View
2  build/buffered-reader.js
@@ -1 +1 @@
-"use strict";var EVENTS=require("events"),FS=require("fs"),BUFFER_SIZE=16384,INVALID_BUFFER_SIZE="The buffer size must be greater than 0.",INVALID_START_OFFSET="The start offset must be greater than or equals to 0.",INVALID_END_OFFSET="The end offset must be greater than or equals to 0.",INVALID_RANGE_OFFSET="The end offset must be greater than or equals to the start offset.",INVALID_BYTES_RANGE_ERROR="The number of bytes to read must be greater than 0.",INVALID_SEEK_OFFSET="The offset must be greater than or equals to 0.",NO_FILE_ERROR="The source is not a file.",BufferedReader=function(a,b){EVENTS.EventEmitter.call(this),b=b||{},b.bufferSize===0&&(b.bufferSize=-1),this._settings={bufferSize:b.bufferSize||BUFFER_SIZE,encoding:b.encoding||null,start:b.start||0,end:b.end};if(this._settings.bufferSize<1)throw new Error(INVALID_BUFFER_SIZE);if(this._settings.start<0)throw new Error(INVALID_START_OFFSET);if(this._settings.end<0)throw new Error(INVALID_END_OFFSET);if(this._settings.end<this._settings.start)throw new Error(INVALID_RANGE_OFFSET);this._fileName=a,this._fd=null,this._buffer=null,this._fileOffset=this._settings.start,this._bufferOffset=0,this._dataOffset=0,this._realOffset=this._settings.start,this._fileSize=null,this._initialized=!1,this._interrupted=!1,this._isEOF=!1,this._noMoreBuffers=!1,this._needRead=!1,this._reading=!1};BufferedReader.prototype=Object.create(EVENTS.EventEmitter.prototype),BufferedReader.prototype.constructor=BufferedReader,BufferedReader.prototype.interrupt=function(){this._reading&&(this._interrupted=!0)},BufferedReader.prototype.read=function(){this._reading=!0;var a=FS.createReadStream(this._fileName,this._settings),b=null,c=0,d=this,e=this.listeners("character").length!==0,f=this.listeners("line").length!==0,g=this.listeners("byte").length!==0,h=e||f||g;a.on("data",function(i){var j=0,k,l,m=i.length,n=!1;if(h){for(var o=0;o<m;o++){if(d._interrupted)break;l=i[o];if(!a.encoding){c++,g&&d.emit("byte",l,c);continue}c+=Buffer.byteLength(l,d._settings.encoding),e&&d.emit("character",l,c);if(!f)continue;if(l==="\r"){n=!0;continue}l==="\n"&&(k=i.slice(j,n?o-1:o),j=o+1,b&&(k=b.concat(k),b=null),d.emit("line",k,c)),n=!1}if(f&&a.encoding&&j!==m){var p=j===0?i:i.slice(j);b=b?b.concat(p):p}}d.emit("buffer",i,c),d._interrupted&&(d._interrupted=!1,a.destroy(),d.emit("end"))}),a.on("end",function(){d._interrupted=!1,h&&b&&d.emit("line",b,c),this._reading=!1,d.emit("end")}),a.on("error",function(a){d._interrupted=!1,d.emit("error",a)})},BufferedReader.prototype._init=function(a){var b=this;FS.stat(this._fileName,function(c,d){if(c)return a(c);if(d.isFile()){if(b._settings.start>=d.size)return b._isEOF=!0,a(null);!b._settings.end&&b._settings.end!==0&&(b._settings.end=d.size),b._settings.end>=d.size&&(b._settings.end=d.size-1),b._fileSize=d.size,a(null)}else a(new Error(NO_FILE_ERROR))})},BufferedReader.prototype._read=function(a){var b=this,c=this._settings.bufferSize;FS.read(this._fd,this._buffer,0,c,this._fileOffset,function(d,e){if(d)return a(d);b._fileOffset+=e,b._fileOffset===b._fileSize&&(b._noMoreBuffers=!0),e<c&&(b._buffer=b._buffer.slice(0,e)),a(null)})},BufferedReader.prototype._readBytes=function(a,b){if(this._needRead){this._needRead=!1;var c=this;this._read(function(d){if(d)return b(d,null,-1);c._readBytes(a,b)});return}var d=function(){var e=a-c._dataOffset,g=c._buffer.length-c._bufferOffset,h=g<=e?g:e;c._buffer.copy(f,c._dataOffset,c._bufferOffset,c._bufferOffset+h),c._bufferOffset+=h,c._realOffset+=h,c._bufferOffset===c._buffer.length&&(c._bufferOffset=0,c._needRead=!0),c._dataOffset+=h,c._dataOffset===a?(c._dataOffset=0,c._isEOF=c._noMoreBuffers,b(null,f,a)):c._noMoreBuffers?(c._isEOF=!0,h=c._dataOffset,c._dataOffset=0,b(null,f.slice(0,h),h)):(c._needRead=!1,c._read(function(a){if(a)return b(a,null,-1);d()}))},c=this,e=c._settings.end-c._realOffset+1;a=e<a?e:a;if(a===0)return b(null,null,0);var f=new Buffer(a),g=c._buffer.length;if(a<=g){var h=c._bufferOffset+a;if(h<=g)c._buffer.copy(f,0,c._bufferOffset,h),c._bufferOffset=h,c._realOffset+=a,b(null,f,a);else{var i=g-c._bufferOffset;c._realOffset+=i,i!==0&&c._buffer.copy(f,0,c._bufferOffset,c._bufferOffset+i);if(c._noMoreBuffers)return c._isEOF=!0,b(null,f.slice(0,i),i);c._read(function(d){if(d)return b(d,null,-1);g=c._buffer.length;var e=a-i;if(g<=e){c._realOffset+=g,c._isEOF=!0,c._buffer.copy(f,i,0,g);var h=i+g;b(null,f.slice(0,h),h)}else c._realOffset+=e,c._bufferOffset=e,c._buffer.copy(f,i,0,c._bufferOffset),b(null,f,a)})}}else d()},BufferedReader.prototype.close=function(a){a&&(a=a.bind(this));if(!this._fd){a&&a(null);return}var b=this;FS.close(this._fd,function(c){b._fd=null,b._buffer=null,a&&a(c)})},BufferedReader.prototype.readBytes=function(a,b){b=b.bind(this);if(a<1||this._isEOF)return b(null,null,0);var c=function(){if(d._isEOF)return b(null,null,0);FS.open(d._fileName,"r",function(c,e){if(c)return b(c,null,-1);d._fd=e,d._buffer=new Buffer(d._settings.bufferSize),d._read(function(c){if(c)return b(c,null,-1);d._readBytes(a,b)})})},d=this;if(!this._initialized)this._init(function(a){if(a)return b(a,null);d._initialized=!0,c()});else{if(!this._fd)return c();this._readBytes(a,b)}},BufferedReader.prototype.seek=function(a,b){b=b.bind(this);if(a<0)return b(new Error(INVALID_SEEK_OFFSET));var c=function(){a+=d._settings.start;if(a>=d._settings.end+1)d._isEOF=!0;else{d._isEOF=!1;var c=d._fileOffset-(d._buffer?d._buffer.length:0);a>=c&&a<d._fileOffset?(d._bufferOffset=a-c,d._realOffset=a):(d._needRead=d._fd?!0:!1,d._noMoreBuffers=!1,d._fileOffset=a,d._bufferOffset=0,d._realOffset=a)}b(null)},d=this;this._initialized?c():this._init(function(a){if(a)return b(a,null);d._initialized=!0,c()})},BufferedReader.prototype.skip=function(a,b){b=b.bind(this);if(a<1||this._isEOF)return b(null,0);var c=function(){var c=d._settings.end-d._realOffset+1;a=a<=c?a:c,d.seek(d._realOffset-d._settings.start+a,function(){b(null,a)})},d=this;this._initialized?c():this._init(function(a){if(a)return b(a,null);d._initialized=!0,c()})},module.exports=BufferedReader;
+"use strict";var EVENTS=require("events"),FS=require("fs"),BUFFER_SIZE=16384,INVALID_BUFFER_SIZE="The buffer size must be greater than 0.",INVALID_START_OFFSET="The start offset must be greater than or equals to 0.",INVALID_END_OFFSET="The end offset must be greater than or equals to 0.",INVALID_RANGE_OFFSET="The end offset must be greater than or equals to the start offset.",INVALID_BYTES_RANGE_ERROR="The number of bytes to read must be greater than 0.",INVALID_SEEK_OFFSET="The offset must be greater than or equals to 0.",NO_FILE_ERROR="The source is not a file.",BufferedReader=function(e,t){EVENTS.EventEmitter.call(this),t=t||{},t.bufferSize===0&&(t.bufferSize=-1),this._settings={bufferSize:t.bufferSize||BUFFER_SIZE,encoding:t.encoding||null,start:t.start||0,end:t.end};if(this._settings.bufferSize<1)throw new Error(INVALID_BUFFER_SIZE);if(this._settings.start<0)throw new Error(INVALID_START_OFFSET);if(this._settings.end<0)throw new Error(INVALID_END_OFFSET);if(this._settings.end<this._settings.start)throw new Error(INVALID_RANGE_OFFSET);this._fileName=e,this._fd=null,this._buffer=null,this._fileOffset=this._settings.start,this._bufferOffset=0,this._dataOffset=0,this._realOffset=this._settings.start,this._fileSize=null,this._initialized=!1,this._interrupted=!1,this._isEOF=!1,this._noMoreBuffers=!1,this._needRead=!1,this._reading=!1};BufferedReader.prototype=Object.create(EVENTS.EventEmitter.prototype),BufferedReader.prototype.constructor=BufferedReader,BufferedReader.prototype.interrupt=function(){this._reading&&(this._interrupted=!0)},BufferedReader.prototype.read=function(){this._reading=!0;var e=FS.createReadStream(this._fileName,this._settings),t=null,n=0,r=this,i=this.listeners("character").length!==0,s=this.listeners("line").length!==0,o=this.listeners("byte").length!==0,u=i||s||o;e.on("data",function(a){var f=0,l,c,h=a.length,p=!1;if(u){for(var d=0;d<h;d++){if(r._interrupted)break;c=a[d];if(!e.encoding){n++,o&&r.emit("byte",c,n);continue}n+=Buffer.byteLength(c,r._settings.encoding),i&&r.emit("character",c,n);if(!s)continue;if(c==="\r"){p=!0;continue}c==="\n"&&(l=a.slice(f,p?d-1:d),f=d+1,t&&(l=t.concat(l),t=null),r.emit("line",l,n)),p=!1}if(s&&e.encoding&&f!==h){var v=f===0?a:a.slice(f);t=t?t.concat(v):v}}r.emit("buffer",a,n),r._interrupted&&(r._interrupted=!1,e.destroy(),r.emit("end"))}),e.on("end",function(){r._interrupted=!1,u&&t&&r.emit("line",t,n),this._reading=!1,r.emit("end")}),e.on("error",function(e){r._interrupted=!1,r.emit("error",e)})},BufferedReader.prototype._init=function(e){var t=this;FS.stat(this._fileName,function(n,r){if(n)return e(n);if(r.isFile()){if(t._settings.start>=r.size)return t._isEOF=!0,e(null);!t._settings.end&&t._settings.end!==0&&(t._settings.end=r.size),t._settings.end>=r.size&&(t._settings.end=r.size-1),t._fileSize=r.size,e(null)}else e(new Error(NO_FILE_ERROR))})},BufferedReader.prototype._read=function(e){var t=this,n=this._settings.bufferSize;FS.read(this._fd,this._buffer,0,n,this._fileOffset,function(r,i){if(r)return e(r);t._fileOffset+=i,t._fileOffset===t._fileSize&&(t._noMoreBuffers=!0),i<n&&(t._buffer=t._buffer.slice(0,i)),e(null)})},BufferedReader.prototype._readBytes=function(e,t){if(this._needRead){this._needRead=!1;var n=this;this._read(function(r){if(r)return t(r,null,-1);n._readBytes(e,t)});return}var r=function(){var i=e-n._dataOffset,o=n._buffer.length-n._bufferOffset,u=o<=i?o:i;n._buffer.copy(s,n._dataOffset,n._bufferOffset,n._bufferOffset+u),n._bufferOffset+=u,n._realOffset+=u,n._bufferOffset===n._buffer.length&&(n._bufferOffset=0,n._needRead=!0),n._dataOffset+=u,n._dataOffset===e?(n._dataOffset=0,n._isEOF=n._noMoreBuffers,t(null,s,e)):n._noMoreBuffers?(n._isEOF=!0,u=n._dataOffset,n._dataOffset=0,t(null,s.slice(0,u),u)):(n._needRead=!1,n._read(function(e){if(e)return t(e,null,-1);r()}))},n=this,i=n._settings.end-n._realOffset+1;e=i<e?i:e;if(e===0)return t(null,null,0);var s=new Buffer(e),o=n._buffer.length;if(e<=o){var u=n._bufferOffset+e;if(u<=o)n._buffer.copy(s,0,n._bufferOffset,u),n._bufferOffset=u,n._realOffset+=e,t(null,s,e);else{var a=o-n._bufferOffset;n._realOffset+=a,a!==0&&n._buffer.copy(s,0,n._bufferOffset,n._bufferOffset+a);if(n._noMoreBuffers)return n._isEOF=!0,t(null,s.slice(0,a),a);n._read(function(r){if(r)return t(r,null,-1);o=n._buffer.length;var i=e-a;if(o<=i){n._realOffset+=o,n._isEOF=!0,n._buffer.copy(s,a,0,o);var u=a+o;t(null,s.slice(0,u),u)}else n._realOffset+=i,n._bufferOffset=i,n._buffer.copy(s,a,0,n._bufferOffset),t(null,s,e)})}}else r()},BufferedReader.prototype.close=function(e){e&&(e=e.bind(this));if(!this._fd){e&&e(null);return}var t=this;FS.close(this._fd,function(n){t._fd=null,t._buffer=null,e&&e(n)})},BufferedReader.prototype.readBytes=function(e,t){t=t.bind(this);if(e<1||this._isEOF)return t(null,null,0);var n=function(){if(r._isEOF)return t(null,null,0);FS.open(r._fileName,"r",function(n,i){if(n)return t(n,null,-1);r._fd=i,r._buffer=new Buffer(r._settings.bufferSize),r._read(function(n){if(n)return t(n,null,-1);r._readBytes(e,t)})})},r=this;if(!this._initialized)this._init(function(e){if(e)return t(e,null);r._initialized=!0,n()});else{if(!this._fd)return n();this._readBytes(e,t)}},BufferedReader.prototype.seek=function(e,t){t=t.bind(this);if(e<0)return t(new Error(INVALID_SEEK_OFFSET));var n=function(){e+=r._settings.start;if(e>=r._settings.end+1)r._isEOF=!0;else{r._isEOF=!1;var n=r._fileOffset-(r._buffer?r._buffer.length:0);e>=n&&e<r._fileOffset?(r._bufferOffset=e-n,r._realOffset=e):(r._needRead=r._fd?!0:!1,r._noMoreBuffers=!1,r._fileOffset=e,r._bufferOffset=0,r._realOffset=e)}t(null)},r=this;this._initialized?n():this._init(function(e){if(e)return t(e,null);r._initialized=!0,n()})},BufferedReader.prototype.skip=function(e,t){t=t.bind(this);if(e<1||this._isEOF)return t(null,0);var n=function(){var n=r._settings.end-r._realOffset+1;e=e<=n?e:n,r.seek(r._realOffset-r._settings.start+e,function(){t(null,e)})},r=this;this._initialized?n():this._init(function(e){if(e)return t(e,null);r._initialized=!0,n()})},module.exports=BufferedReader;
View
22 build/package.json
@@ -1,22 +0,0 @@
-{
- "name": "buffered-reader",
- "version": "0.2.3",
- "description": "Fully configurable buffered reader.",
- "keywords": ["buffer", "reader", "line", "read line", "file", "read file", "read text file",
- "read binary file", "binary"],
- "author": {
- "name": "Gabriel Llamas"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/Gagle/Node-BufferedReader.git"
- },
- "engines": {
- "node": "*"
- },
- "licenses": [{
- "type": "MIT",
- "url": "http://www.opensource.org/licenses/mit-license.html"
- }],
- "main": "buffered-reader"
-}
View
22 src/package.json
@@ -1,22 +0,0 @@
-{
- "name": "buffered-reader",
- "version": "0.2.3",
- "description": "Fully configurable buffered reader.",
- "keywords": ["buffer", "reader", "line", "read line", "file", "read file", "read text file",
- "read binary file", "binary"],
- "author": {
- "name": "Gabriel Llamas"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/Gagle/Node-BufferedReader.git"
- },
- "engines": {
- "node": "*"
- },
- "licenses": [{
- "type": "MIT",
- "url": "http://www.opensource.org/licenses/mit-license.html"
- }],
- "main": "buffered-reader"
-}
View
42 test/tests/node_modules/buffered-writer/README.md
@@ -0,0 +1,42 @@
+<a name="start"></a>
+
+Node BufferedWriter
+===================
+
+#### Fully configurable buffered writer for node.js ####
+
+[Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)
+
+Version: 0.1.8
+
+When you need to write a file you typically write the content in little chunks at a time. To avoid multiple calls to the underlying I/O layer you need to use a piece of memory called "buffer", so instead of writting directly to the disk, you write to the buffer and when it is filled the content is written to disk. Doing this you win performance.
+
+This library allows you to write files using internal buffers, so you don't have to worry about them.
+
+<a name="availability"></a>
+#### Availability [](#start) ####
+
+Via npm:
+
+```
+npm install buffered-writer
+```
+
+Or simply copying `build/buffered-writer.js` into your project's directory and `require()` accordingly.
+
+***
+
+<a name="compatibility"></a>
+#### Compatibility [](#start) ####
+
+✔ Node 0.4.10+
+
+***
+
+<a name="documentation"></a>
+#### Documentation [](#start) ####
+
+[Reference](https://github.com/Gagle/Node-BufferedWriter/wiki/Reference)
+[Examples](https://github.com/Gagle/Node-BufferedWriter/tree/master/examples)
+[Change log](https://github.com/Gagle/Node-BufferedWriter/wiki/Change-log)
+[MIT License](https://github.com/Gagle/Node-BufferedWriter/blob/master/LICENSE)
View
2  test/tests/node_modules/buffered-writer/buffered-writer.js
@@ -1 +1 @@
-"use strict";var EVENTS=require("events"),FS=require("fs"),BUFFER_SIZE=16384,EOL=process.platform.indexOf("win")!==-1?new Buffer([13,10]):new Buffer([10]),INVALID_BUFFER_SIZE=new Error("The buffer size must be greater than 0."),BufferedWriter=function(a,b){EVENTS.EventEmitter.call(this),b=b||{},b.bufferSize===0&&(b.bufferSize=-1),this._settings={bufferSize:b.bufferSize||BUFFER_SIZE,encoding:b.encoding||null,append:b.append?"a":"w"};if(this._settings.bufferSize<1)throw INVALID_BUFFER_SIZE;this._fileName=a,this._stream=null,this._buffer=null,this._bufferOffset=0};BufferedWriter.prototype=Object.create(EVENTS.EventEmitter.prototype),BufferedWriter.prototype.constructor=BufferedWriter,BufferedWriter.prototype._flush=function(){this._stream.write(new Buffer(this._bufferOffset!==this._settings.bufferSize?this._buffer.slice(0,this._bufferOffset):this._buffer)),this._bufferOffset=0},BufferedWriter.prototype._canWrite=function(a){return a+this._bufferOffset>this._settings.bufferSize&&(a=this._settings.bufferSize-this._bufferOffset),a},BufferedWriter.prototype._write=function(a,b,c){var d=this;this._stream||(this._buffer=new Buffer(this._settings.bufferSize),this._stream=FS.createWriteStream(this._fileName,{flags:d._settings.append}),this._stream.on("error",function(a){d.emit("error",a)}));var e=this._canWrite(c);a.copy(this._buffer,this._bufferOffset,b,b+e),this._bufferOffset+=e,b+=e,c-=e,this._bufferOffset===this._settings.bufferSize&&(this._flush(),c!==0&&this._write(a,b,c))},BufferedWriter.prototype.close=function(a){if(!this._stream)return;this._bufferOffset!==0&&this._flush();var b=this;this._stream.on("close",function(){a&&a.call(this)}),this._stream.destroySoon(),this._stream=null,this._buffer=null},BufferedWriter.prototype.newLine=function(){return this._write(EOL,0,EOL.length),this};var isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"},toHexArray=function(a){var b=[];do b.unshift(a&255),a>>>=8;while(a);return b};BufferedWriter.prototype.write=function(a,b,c){var d=typeof a;if(d==="number")b=0,a=toHexArray(a),c=a.length,a=new Buffer(a);else if(d==="string")b=0,c=Buffer.byteLength(a,this._settings.encoding),a=new Buffer(a,this._settings.encoding);else{isArray(a)&&(a=new Buffer(a));var e=arguments.length;e===1&&(b=0,c=1)}return this._write(a,b,c),this},module.exports=BufferedWriter;
+"use strict";var EVENTS=require("events"),FS=require("fs"),BUFFER_SIZE=16384,EOL=process.platform.indexOf("win")!==-1?new Buffer([13,10]):new Buffer([10]),INVALID_BUFFER_SIZE=new Error("The buffer size must be greater than 0."),BufferedWriter=function(e,t){EVENTS.EventEmitter.call(this),t=t||{},t.bufferSize===0&&(t.bufferSize=-1),this._settings={bufferSize:t.bufferSize||BUFFER_SIZE,encoding:t.encoding||null,append:t.append?"a":"w"};if(this._settings.bufferSize<1)throw INVALID_BUFFER_SIZE;this._fileName=e,this._stream=null,this._buffer=null,this._bufferOffset=0};BufferedWriter.prototype=Object.create(EVENTS.EventEmitter.prototype),BufferedWriter.prototype.constructor=BufferedWriter,BufferedWriter.prototype._flush=function(){this._stream.write(new Buffer(this._bufferOffset!==this._settings.bufferSize?this._buffer.slice(0,this._bufferOffset):this._buffer)),this._bufferOffset=0},BufferedWriter.prototype._canWrite=function(e){return e+this._bufferOffset>this._settings.bufferSize&&(e=this._settings.bufferSize-this._bufferOffset),e},BufferedWriter.prototype._write=function(e,t,n){var r=this;this._stream||(this._buffer=new Buffer(this._settings.bufferSize),this._stream=FS.createWriteStream(this._fileName,{flags:r._settings.append}),this._stream.on("error",function(e){r.emit("error",e)}));if(n===0)return;var i=this._canWrite(n);e.copy(this._buffer,this._bufferOffset,t,t+i),this._bufferOffset+=i,t+=i,n-=i,this._bufferOffset===this._settings.bufferSize&&(this._flush(),n!==0&&this._write(e,t,n))},BufferedWriter.prototype.close=function(e){if(!this._stream)return;this._bufferOffset!==0&&this._flush();var t=this;this._stream.on("close",function(){e&&e.call(this)}),this._stream.destroySoon(),this._stream=null,this._buffer=null},BufferedWriter.prototype.newLine=function(){return this._write(EOL,0,EOL.length),this};var isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"},toHexArray=function(e){var t=[];do t.unshift(e&255),e>>>=8;while(e);return t};BufferedWriter.prototype.write=function(e,t,n){var r=typeof e;if(r==="number")t=0,e=toHexArray(e),n=e.length,e=new Buffer(e);else if(r==="string")t=0,n=Buffer.byteLength(e,this._settings.encoding),e=new Buffer(e,this._settings.encoding);else{isArray(e)&&(e=new Buffer(e));var i=arguments.length;i===1&&(t=0,n=e.length==0?0:1)}return this._write(e,t,n),this},module.exports=BufferedWriter;
View
18 test/tests/node_modules/buffered-writer/package.json
@@ -1,6 +1,6 @@
{
"name": "buffered-writer",
- "version": "0.1.7",
+ "version": "0.1.8",
"description": "Fully configurable buffered writer.",
"keywords": [
"buffer",
@@ -30,17 +30,7 @@
}
],
"main": "buffered-writer",
- "_npmUser": {
- "name": "Gagle",
- "email": "gaglekas@gmail.com"
- },
- "_id": "buffered-writer@0.1.7",
- "dependencies": {},
- "devDependencies": {},
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.21",
- "_nodeVersion": "v0.6.17",
- "_defaultsLoaded": true,
- "_from": "buffered-writer@0.1.7"
+ "readme": "<a name=\"start\"></a>\r\n\r\nNode BufferedWriter\r\n===================\r\n\r\n#### Fully configurable buffered writer for node.js ####\r\n\r\n[Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)\r\n\r\nVersion: 0.1.8\r\n\r\nWhen you need to write a file you typically write the content in little chunks at a time. To avoid multiple calls to the underlying I/O layer you need to use a piece of memory called \"buffer\", so instead of writting directly to the disk, you write to the buffer and when it is filled the content is written to disk. Doing this you win performance.\r\n\r\nThis library allows you to write files using internal buffers, so you don't have to worry about them.\r\n\r\n<a name=\"availability\"></a>\r\n#### Availability [↑](#start) ####\r\n\r\nVia npm:\r\n\r\n```\r\nnpm install buffered-writer\r\n```\r\n\r\nOr simply copying `build/buffered-writer.js` into your project's directory and `require()` accordingly.\r\n\r\n***\r\n\r\n<a name=\"compatibility\"></a>\r\n#### Compatibility [↑](#start) ####\r\n\r\n✔ Node 0.4.10+\r\n\r\n***\r\n\r\n<a name=\"documentation\"></a>\r\n#### Documentation [↑](#start) ####\r\n \r\n[Reference](https://github.com/Gagle/Node-BufferedWriter/wiki/Reference) \r\n[Examples](https://github.com/Gagle/Node-BufferedWriter/tree/master/examples) \r\n[Change log](https://github.com/Gagle/Node-BufferedWriter/wiki/Change-log) \r\n[MIT License](https://github.com/Gagle/Node-BufferedWriter/blob/master/LICENSE)",
+ "_id": "buffered-writer@0.1.8",
+ "_from": "buffered-writer"
}
Please sign in to comment.
Something went wrong with that request. Please try again.