3.0.1 • Published 5 years ago

@sho-js/fingerprint v3.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Wearesho Fingerprint Generator

Installation

npm i --save @sho-js/fingerprint

Peer dependencies:

Usage

Setup and generation

import * as FingerPrint from "@sho-js/fingerprint";

// generating token based on random and current timestamp
FingerPrint.simple()
    .then((randomToken) => console.log(randomToken));

// https://github.com/Valve/fingerprintjs2
FingerPrint.fp2()
    .catch(FingerPrint.simple) // fallback to random token on error
    .then((fp2token) => console.log(fp2token));

// https://github.com/js-cookie/js-cookie
FingerPrint.cookie(
    FingerPrint.fp2(), // fallback if no cookie
    "cookie.name",
    { // cookie attributes, see js-cookie for details
        domain: ".wearesho.com",
    }
)
3.0.1

5 years ago

3.0.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago