Prerequisites
- Node.js v18+
- Redis v6+
# Initialize the repo
./.scripts/init.sh
npm install @dreamystify/fingrprint
To build the package locally with the TypeScript compiler, run:
npm run build
import Fingrprint from '@dreamystify/fingrprint';
const fingrprint = new Fingrprint({
host: `localhost`,
port: 6379,
username: `username`,
password: `password`
});
And to use it,
const id = await fingrprint.getId();
// 6936951099534350941n
const ids = await fingrprint.getIds(); // defaults to 1
// [6936951099534350941n]
const ids = await fingrprint.getIds(3);
// [6936951099534350941n, 6936951099534350942n, 6936951099534350943n]
The project was inspired by Icicle, just setup for node.js.