Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated readme

  • Loading branch information...
commit 7ab4660fcd5f208d86ed6e7771c42f386fbdb08a 1 parent 1d4941c
@gagle authored
Showing with 20 additions and 1 deletion.
  1. +20 −1 README.md
View
21 README.md
@@ -5,7 +5,7 @@ Node BufferedWriter
#### Fully configurable buffered writer for node.js ####
-[Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)
+[Show me!](#showme) | [Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)
Version: 0.1.10
@@ -13,6 +13,25 @@ When you need to write a file you typically write the content in little chunks a
This library allows you to write files using internal buffers, so you don't have to worry about them.
+<a name="showme"></a>
+#### Show me! [](#start) ####
+
+```javascript
+var BufferedWriter = require ("buffered-writer");
+
+new BufferedWriter ("file")
+ .on ("error", function (error){
+ console.log (error);
+ })
+
+ .write ([0x00, 0x01, 0x02], 0, 3) //Writes 0x00, 0x01, 0x02
+ .write (new Buffer ([0x03, 0x04]), 1, 1) //Writes 0x04
+ .write (0x0506) //Writes 0x05, 0x06
+ .close ();
+```
+
+***
+
<a name="availability"></a>
#### Availability [](#start) ####
Please sign in to comment.
Something went wrong with that request. Please try again.