JSPM

buffer-reverse

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 178708
  • Score
    100M100P100Q161245F
  • License MIT

A lite module for reverse-operations on buffers

Package Exports

  • buffer-reverse
  • buffer-reverse/inplace

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (buffer-reverse) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

buffer-reverse

NPM TRAVIS

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