from_buffer.js 302 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 var binary = require('../'); var test = require('tap').test; test('from buffer', function (t) { t.plan(1); binary(new Buffer([ 97, 98, 99 ])) .word8('a') .word16be('bc') .tap(function (vars) { t.same(vars, { a : 97, bc : 25187 }); }) ; });