Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Get the hash of a string

License

NotificationsYou must be signed in to change notification settings

sindresorhus/string-hash

Repository files navigation

Get the hash of a string

Uses the non-cryptographic hash functionFNV-1a.

Similar to Java'sString#hashCode().

Install

npm install @sindresorhus/string-hash

Usage

importstringHashfrom'@sindresorhus/string-hash';stringHash('🦄🌈');//=> 2868248295stringHash('👌😎');//=> 2903279002

It returns the hash as a positive integer.

FAQ

Why is this just a small wrapper around thefnv1a package?

Answer.


[8]ページ先頭

©2009-2025 Movatter.jp