Skip to content

About

A NodeJS implementation of the Nilsimsa hash

Resources

Stars

10 stars

Watchers

2 watching

Forks

Repository files navigation

node-nilsimsa   CI npm node license

A Node.js implementation of the Nilsimsa locality-sensitive hash, based on jwilkins/nilsimsa.

Requires Node.js >= 22. No dependencies.

Examples

Computing digests

import { Nilsimsa } from 'nilsimsa'

const nilsimsa = new Nilsimsa()
nilsimsa.update('something')
nilsimsa.digest('hex') // 0008004000490a680001200400002008408074004100c00e02180a0810a44210

new Nilsimsa('somethingelse').digest('hex') // 40088440005b8aec4081206c8a002808c8807401c188e20e02180a0814a44250

Comparing digests

import { Nilsimsa } from 'nilsimsa'

const d1 = new Nilsimsa('The quick brown fox').digest('hex')
const d2 = new Nilsimsa('The quicker brown fox').digest('hex')

Nilsimsa.compare(d1, d2) // 91

License

MIT

About

A NodeJS implementation of the Nilsimsa hash

Resources

Stars

10 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages