hashcode.ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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);

Package Sidebar

Install

npm i hashcode.ts

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

5.21 kB

Total Files

4

Last publish

Collaborators

  • rchoffardet