https://github.com/browserify/buffer-reverse
A lite module for byte reversal on buffers.
https://github.com/browserify/buffer-reverse
Last synced: 4 months ago
JSON representation
A lite module for byte reversal on buffers.
- Host: GitHub
- URL: https://github.com/browserify/buffer-reverse
- Owner: browserify
- License: mit
- Created: 2015-09-25T07:24:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-10-02T09:29:23.000Z (over 7 years ago)
- Last Synced: 2024-04-07T00:53:16.760Z (almost 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 6
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# buffer-reverse
[](https://www.npmjs.org/package/buffer-reverse)
[](https://travis-ci.org/crypto-browserify/buffer-reverse)
[](https://github.com/feross/standard)
A lite module for byte reverse on buffers.
## Examples
``` javascript
var reverse = require('buffer-reverse')
var a = new Buffer('00ff0f', 'hex')
console.log(reverse(a))
// =>
```
Or for those seeking those few extra cycles, perform the operation in place:
``` javascript
var reverseInplace = require('buffer-reverse/inplace')
var a = new Buffer('00ff0f', 'hex')
console.log(reverseInplace(a))
// =>
// See that a has been mutated
console.log(a)
// =>
```
## License [MIT](LICENSE)