pretty-hash
Output binary buffers as a nice shortened hex string
Last updated 8 years ago by pfraze .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install pretty-hash 
SYNC missed versions from official npm registry.

pretty-hash

Output binary buffers as a nice shortened hex string

var prettyHash = require('pretty-hash')
var crypto = require('crypto')

prettyHash(crypto.randomBytes(32)) // => '0b0a97..f3'
prettyHash(crypto.randomBytes(16)) // => '0b0395..8a'
prettyHash(crypto.randomBytes(4)) // => '49ab09ed'
prettyHash(crypto.randomBytes(1)) // => 'f8'
prettyHash('not a hash') // => 'not a hash'

Current Tags

  • 1.0.1                                ...           latest (8 years ago)

2 Versions

  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE