Skip to content

rchoffardet/hashcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hashcode

A simple, yet powerful, hashcode helper

Installation

    npm install hashcode.ts
    # or ...
    yarn add hashcode.ts

Usage

   import Hashcode from "./hashcode";

   // You can use the generic form...
   const value = Hashcode.value({"hello": "world!"});

   // ... or the specific form if you know the type
   const boolean = Hashcode.boolean(true);
   const number = Hashcode.number(1337);
   const string = Hashcode.string("Hello world!");
   const date = Hashcode.date(new Date());
   const array = Hashcode.array([42, 1337]);
   const object = Hashcode.object({"hello": "world!"});

   // There is also an helper for combining hashcodes
   const hash = Hashcode.combine(boolean, number, string);

About

A simple, yet powerful, hashcode helper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published