1.1.0 • Published 4 years ago

stackhash v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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