cosBufferdeprecated

buffer api for Node.JS

Usage no npm install needed!

<script type="module">
  import cosBuffer from 'https://cdn.skypack.dev/cosBuffer';
</script>

README

cosBuffer - a node.js buffer api

Install with:

npm install cosBuffer

Usage

Simple example, included as test.js:

    var cosBuff = require('./')();
    cosBuff.incHeader = true;
    var buf = cosBuff.packet('chat','this is a message');
    var msg = cosBuff.parse(buf);
    console.log('Type:',msg.type);
    console.log('Data:',msg.data);

Demo

test.js