Skip to content
This repository
Browse code

readme updates for the methods

  • Loading branch information...
commit 8464aaedd252ae4abcc89491af34c2c9804f1088 1 parent 701d3fc
James Halliday authored

Showing 1 changed file with 36 additions and 0 deletions. Show diff stats Hide diff stats

  1. +36 0 README.markdown
36 README.markdown
Source Rendered
@@ -28,6 +28,42 @@ buf.js
28 28 $ node buf.js
29 29 { ab: 25185, cf: 1667523942, x: 0 }
30 30
  31 +Methods
  32 +=======
  33 +
  34 +Binary(buf)
  35 +-----------
  36 +
  37 +Start a new chain parser for a `Buffer`.
  38 +
  39 +Binary(emitter)
  40 +---------------
  41 +Binary(emitter, eventName='data')
  42 +---------------------------------
  43 +
  44 +Start a new chain parser for an `EventEmitter` for an event name `eventName`,
  45 +which defaults to `'data'`.
  46 +
  47 +word{8,16,32,64}{l,b}{e,u,s}(name)
  48 +----------------------------------
  49 +
  50 +Parse bytes in the buffer or stream given:
  51 +
  52 +# number of bits
  53 +# endianness ( l : little, b : big ),
  54 +# signedness ( u and e : unsigned, s : signed )
  55 +
  56 +These functions won't start parsing until all previous parser functions have run
  57 +and the data is available.
  58 +
  59 +The result of the parse goes into the variable stash at `name`.
  60 +
  61 +tap(cb)
  62 +-------
  63 +
  64 +The callback `cb` is provided with the variable stash from all the previous
  65 +actions once they've all finished.
  66 +
31 67 Installation
32 68 ============
33 69

0 comments on commit 8464aae

Please sign in to comment.
Something went wrong with that request. Please try again.