stackhash

1.1.0 • Public • Published

StackHash

Visually-recognizable unified hash of an error stack

Installation

npm i --save stackhash

Example usage

const stackhash = require('../lib/stackhash')
 
const error1 = new Error('i am the error')
const error2 = { foo: 'bar' }
const error3 = undefined
 
console.log(stackhash(error1))
// stackhash-S672362F9
console.log(stackhash(error2))
// stackhash-E1B9DF8B9
console.log(stackhash(error3))
// stackhash-null
 
// with salt
stackhash.addSalt('aaaaaaaaaa')
console.log(stackhash(error1))
// stackhash-SEBAAD9E6

Readme

Keywords

Package Sidebar

Install

npm i stackhash

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

1.59 kB

Total Files

4

Last publish

Collaborators

  • grbr