@cursorsdottsx/h
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

| a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z |

H is for Hashcode

@cursorsdottsx/h

A pretty bad implementation of a hashcode that works 99.9% of the time.

Installation

Hashcode can be installed with either NPM or Yarn.

npm install @cursorsdottsx/h
yarn add @cursorsdottsx/h

Usage

Upon importation of Hashcode, it will modify the Object global and give objects a hashCode method.

require("@cursorsdottsx/h");
import "@cursorsdottsx/h";

Documentation

Object.prototype.hashCode(): string

Examples

({ foo: "bar" }).hashCode(); // => KE9iamVjdCRmb28jc3RyaW5nOmZvbyk=

({ object: { pls: "install" }, hello: "world", }).hashCode(); // => KE9iamVjdCRvYmplY3QjS0U5aWFtVmpkQ1J3YkhNamMzUnlhVzVuT25Cc2N5az1AaGVsbG8jc3RyaW5nOmhlbGxvKQ==

The hashcode of an object should be the same, and two objects with the same hashcode should be the same. If this is not true for a pair of objects please open an issue (properties that are not enumerable don't count).

npm abc's homepage

Readme

Keywords

none

Package Sidebar

Install

npm i @cursorsdottsx/h

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

5.32 kB

Total Files

4

Last publish

Collaborators

  • cursorspkg
  • cursorsdev