Skip to content

billjohnston/slim-object-hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slim Object Hash

Generates hashes from objects

Smaller than object-hash 34.7 KB vs 769 B

Faster than object-hash jsperf-object-hash-comparison

Installation

yarn add slim-object-hash

Usage

import slimObjectHash from 'slim-object-hash'

const objHash = slimObjectHash({ a: 'a', b: 'b', c: 'c' })
const objHash2 = slimObjectHash({ c: 'c', b: 'b', a: 'a' })

console.log(objHash) // 2061408781
console.log(objHash === objHash2) // true

Tests

yarn test

About

Generate hashes from objects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published