- Notifications
You must be signed in to change notification settings - Fork7
sindresorhus/string-hash
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Get the hash of a string
Uses the non-cryptographic hash functionFNV-1a.
Similar to Java'sString#hashCode()
.
npm install @sindresorhus/string-hash
importstringHashfrom'@sindresorhus/string-hash';stringHash('🦄🌈');//=> 2868248295stringHash('👌😎');//=> 2903279002
It returns the hash as a positive integer.
About
Get the hash of a string
Topics
Resources
License
Code of conduct
Stars
Watchers
Forks
Packages0
No packages published