芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/@fingerprintjs/fingerprintjs/readme.md
Makes a website visitor identifier from a browser fingerprint. Unlike cookies and local storage, fingerprint stays the same in incognito/private mode and even when browser data is purged. [Demo](https://fingerprintjs.github.io/fingerprintjs/). ## Quick start ### Install from CDN ```html ``` ### Alternatively you can install from NPM to use with Webpack/Rollup/Browserify ```bash npm i @fingerprintjs/fingerprintjs # or yarn add @fingerprintjs/fingerprintjs ``` ```js import FingerprintJS from '@fingerprintjs/fingerprintjs'; (async () => { // We recommend to call `load` at application startup. const fp = await FingerprintJS.load(); // The FingerprintJS agent is ready. // Get a visitor identifier when you'd like to. const result = await fp.get(); // This is the visitor identifier: const visitorId = result.visitorId; console.log(visitorId); })(); ``` 📕 [Full documentation](#open-source-version-reference) ## Upgrade to [Pro version](https://fingerprintjs.com) to get 99.5% identification accuracy
Open Source version
Pro version
Identification accuracy
60%
99.5%
Incognito / Private mode detection
❌
✅
Geolocation
❌
✅
Security
❌
✅
Server API
❌
✅
Webhooks
❌
✅
Stable identifier between versions
❌
✅
Pro result example: ```js { "requestId": "HFMlljrzKEiZmhUNDx7Z", "visitorId": "kHqPGWS1Mj18sZFsP8Wl", "visitorFound": true, "incognito": false, "browserName": "Chrome", "browserVersion": "85.0.4183", "os": "Mac OS X", "osVersion": "10.15.6", "device": "Other", "ip": "192.65.67.131", "ipLocation": { "accuracyRadius": 100, "latitude": 37.409657, "longitude": -121.965467 // ... } } ``` 🍿 [Live demo](https://fingerprintjs.com/demo) ⏱ [How to upgrade from Open Source to Pro in 30 seconds](https://dev.fingerprintjs.com/v3/docs/migrating-from-previous-versions#from-fingerprintjs-open-source-version-3) 📕 [FingerprintJS Pro documentation](https://dev.fingerprintjs.com) ▶️ [Video: use FingerprintJS Pro to prevent multiple signups](https://www.youtube.com/watch?v=jWX9P5_jZn8) ## Open-source version reference ### Installation The library is shipped in various formats: - Global variable ```html ``` - UMD ```js require( ['//cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3/dist/fp.umd.min.js'], (FingerprintJS) => { // Start loading FingerprintJS here } ); ``` - ECMAScript module ```bash # Install the package first: npm i @fingerprintjs/fingerprintjs # or yarn add @fingerprintjs/fingerprintjs ``` ```js import FingerprintJS from '@fingerprintjs/fingerprintjs'; // Start loading FingerprintJS here ``` - CommonJS ```bash # Install the package first: npm i @fingerprintjs/fingerprintjs # or yarn add @fingerprintjs/fingerprintjs ``` ```js const FingerprintJS = require('@fingerprintjs/fingerprintjs'); // Start loading FingerprintJS here ``` ### API - `FingerprintJS.load({ delayFallback?: number }): Promise
` Builds an instance of Agent and waits a delay required for a proper operation. `delayFallback` is an optional parameter that sets duration (milliseconds) of the fallback for browsers that don't support [requestIdleCallback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback); it has a good default value which we don't recommend to change. - `agent.get({ debug?: boolean }): Promise<{ visitorId: string, components: {/* ... */} }>` Gets the visitor identifier. `debug: true` prints debug messages to the console. `visitorId` is the visitor identifier. `components` is a dictionary of components that have formed the identifier; each value is an object like `{ value: any, duration: number }` in case of success and `{ error: object, duration: number }` in case of an unexpected error during getting the component. - `FingerprintJS.hashComponents(components: object): string` Converts a dictionary of components (described above) into a short hash string a.k.a. a visitor identifier. Designed for extending the library with your own components. - `FingerprintJS.componentsToDebugString(components: object): string` Converts a dictionary of components (described above) into human-friendly format. ## Migrating from v2 - [Migration guide](docs/migrating_v2_v3.md) - [V2 documentation](https://github.com/fingerprintjs/fingerprintjs/tree/v2) ## Version policy The OSS version doesn't guarantee the same visitor identifier between versions, but will try to keep them the same as much as possible. To get identifiers that remain stable up to 1 year, please consider [upgrading to pro.](https://dashboard.fingerprintjs.com) The documented JS API follows [Semantic Versioning](https://semver.org). Use undocumented features at your own risk. ## Browser support ```bash npx browserslist "cover 95% in us, not IE < 10" ``` See more details and learn how to run the library in old browsers in the [documentation article](docs/browser_support.md). ## Contributing See the [contributing guidelines](contributing.md) to learn how to start a playground, test and build.