Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

dox

  • Loading branch information...
commit 28f10363d4b8ea016990306581b57f6ef5724367 1 parent 31a60b0
@substack authored
Showing with 37 additions and 0 deletions.
  1. +37 −0 readme.markdown
View
37 readme.markdown
@@ -2,4 +2,41 @@
Toggle the byte ordering of a buffer.
+# example
+``` js
+var toggle = require('endian-toggle');
+var buf = new Buffer('abcd');
+
+console.dir(buf);
+console.dir(toggle(buf, 16));
+```
+
+***
+
+```
+<Buffer 61 62 63 64>
+<Buffer 62 61 64 63>
+```
+
+# methods
+
+``` js
+var toggle = require('endian-toggle')
+```
+
+## toggle(buf, bits)
+
+Return a new buffer from `buf` with toggled endianness at `bits` many bits.
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install endian-toggle
+```
+
+# license
+
+MIT
Please sign in to comment.
Something went wrong with that request. Please try again.