nanohashcode
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Nano HashCode

A tiny (75 bytes), string hash code implementation for JavaScript

  • Small. 75 bytes (minified and gzipped). Size Limit controls the size.
  • No dependencies.
import { hashCode } from 'nanohashcode'
hashCode('hello world') //=> 1794106052

Supports modern browsers, IE, Node.js and React Native.

Install

npm install --save nanohashcode

For quick hacks, you can load Nano HashCode from CDN. Though, it is not recommended to be used in production because of the lower loading performance.

import { hashCode } from 'https://cdn.jsdelivr.net/npm/nanohashcode/hashCode.js'

Nano HashCode provides ES modules. You do not need to do anything to use Nano HashCode as ESM in webpack, Rollup, Parcel, or Node.js.

import { hashCode } from 'nanohashcode'

/nanohashcode/

    Package Sidebar

    Install

    npm i nanohashcode

    Weekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.67 kB

    Total Files

    7

    Last publish

    Collaborators

    • apyrkh