Package Exports
- fingerlockjs
- fingerlockjs/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fingerlockjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Using the getAttributes Function
The getAttributes function is used to retrieve a set of attributes related to the user's browser or environment. This function returns a Promise that resolves to a BuiltinComponents object containing various attributes. Each attribute provides information about a specific aspect of the user's environment.
Usage
To use the getAttributes function in your project, follow these steps:
Import the
getAttributesfunction into your JavaScript/TypeScript code:import { getAttributes } from 'fingerlockjs'; const attributesPromise = getAttributes(); attributesPromise.then((attributes) => { // Handle the attributes here console.log(attributes); }).catch((error) => { // Handle any errors that occur during attribute retrieval console.error(error); });
Response Payload:
- The
getAttributesfunction returns a Promise that resolves to a BuiltinComponents object.
Response Payload
The BuiltinComponents object contains various attributes, each providing information about a specific aspect of the user's environment. Here's a description of some of the attributes included in the response:
- applePay: Information related to Apple Pay.
- architecture: Architecture information.
- audio: Audio-related information.
- canvas: Canvas-related information.
- colorDepth: Color depth of the user's display.
- colorGamut: Color gamut information.
- contrast: Contrast information.
- cookiesEnabled: Indicates if cookies are enabled.
- deviceMemory: Amount of device memory.
- domBlockers: Information about DOM blockers.
- fontPreferences: Font preferences.
- fonts: Array of fonts installed on the device.
- forcedColors: Indicates if forced colors are enabled.
- hardwareConcurrency: Number of hardware threads.
- hdr: Indicates if HDR is supported.
- indexedDB: Indicates if IndexedDB is supported.
- languages: Array of supported languages.
- localStorage: Indicates if local storage is supported.
- math: Mathematical function information.
- monochrome: Monochrome information.
- openDatabase: Indicates if the open database is supported.
- osCpu: Operating system CPU information.
- pdfViewerEnabled: Indicates if the PDF viewer is enabled.
- platform: User's platform (e.g., 'Win32').
- plugins: Array of installed plugins.
- privateClickMeasurement: Private click measurement information.
- reducedMotion: Indicates if reduced motion is enabled.
- screenFrame: Array of screen frame information.