How to use the bitsyntax.match function in bitsyntax

To help you get started, we’ve selected a few bitsyntax examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github noodlefrenzy / node-amqp10 / test / amqp_types.js View on Github external
it('bitsyntax parser 2', function() {
        var buffer = new Buffer([0xA1, 0x3, 0x46, 0x4F, 0x4F]);
        var parser = bitsyntax.parse('161:8, len:8, value:len/binary, rest/binary');
        var matcher = bitsyntax.match(parser, buffer);
        matcher.should.be.ok;
        matcher.value.should.eql(new Buffer([0x46, 0x4F, 0x4F]));
    });
    it('should spit right version', function() {

bitsyntax

Pattern-matching on byte buffers

MIT
Latest version published 6 years ago

Package Health Score

53 / 100
Full package analysis