numeric-buffer

Create Node.js Buffers with integers

npm install numeric-buffer
1 downloads in the last week
2 downloads in the last month

NumericBuffer

numeric-buffer is a tiny module for filling a Node.js Buffer with the binary representation of an integer. You can do this in 0.6.0 with buffer.writeUInt8, but not in 0.4.x.

Installation

npm install numeric-buffer

Usage

(function () {
  "use strict";
  var numericBuffer = require('numeric-buffer');
  var buf = numericBuffer(255);
  // buf is now a Buffer of length 1
  console.log(buf[0]);
  //255
}());
npm loves you