👋
Welcome to hasch
Install
npm i hasch
Usage
import hasch from 'hasch'
hasch(new Uint8Array(123)) === 328550458801291844070341966987876531409n
hasch('abc') === 30216508460253319331260144576202890925n
hasch(123) === 235074070585844934564733336785530021059n
hasch(Buffer.alloc(5)) === 82223369041381735457708905440885830446n
hasch('abc', { seed: 123 }) === 266221380790302914276811936392392262090n
hasch('abc', { seed: 246 }) === 268273496397672601563576200830246633940n
hasch('abc', { base: 8 }) === "265667634335613025344536104026336337257255"
hasch('abc', { base: 12 }) === "617b98437b43184529042060a7607120125"
hasch('abc', { base: 36 }) === "1cg66nyuy96rto54mr28cm84t"
hasch('abc', { base: 36, seed: 1000 }) === "7v1fb64sz40yaulnbbn5uogpr"
hasch('abc', { base: 36, length: 6 }) === "1cg66n"
hasch('abc', { base: 36, length: 20 }) === "1cg66nyuy96rto54mr28"
hasch('abc', { base: 36, length: 30 }) === "000001cg66nyuy96rto54mr28cm84t"
hasch('abc', { decimal: true }) === 0.0144576202890925
hasch('abc', { choose: [2, 4, 'a'] }) === 2
Author
👤 Konrad Pettersson
- Github:
KonkenBonken
- LinkedIn:
Konrad Pettersson
- Discord:
KonkenBonken#1337
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to create an issue on GitHub.
This README was generated with