Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 987 Bytes

README.md

File metadata and controls

37 lines (23 loc) · 987 Bytes

buffer-reverse

NPM Package Build Status

js-standard-style

A lite module for byte reverse on buffers.

Examples

var reverse = require('buffer-reverse')
var a = new Buffer('00ff0f', 'hex')

console.log(reverse(a))
// => <Buffer 0f ff 00>

Or for those seeking those few extra cycles, perform the operation in place:

var reverseInplace = require('buffer-reverse/inplace')
var a = new Buffer('00ff0f', 'hex')

console.log(reverseInplace(a))
// => <Buffer 0f ff 00>

// See that a has been mutated
console.log(a)
// => <Buffer 0f ff 00>

License MIT