@givetech/device-fingerprint
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -1,1 +0,1 @@ | ||
import n,{useContext as o,createContext as t}from"react";var e=t(void 0),i=function(){return o(e)},r=function(o){var t,i=o.children;try{t=function(){var n=document.createElement("canvas"),o=n.getContext("2d");null==o||o.fillText("canvas fingerprint",50,50);var t={userAgent:null===window||void 0===window?void 0:window.navigator.userAgent,language:null===window||void 0===window?void 0:window.navigator.language,colorDepth:null===window||void 0===window?void 0:window.screen.colorDepth,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,platform:null===window||void 0===window?void 0:window.navigator.platform,canvas:n.toDataURL()},e=JSON.stringify(t);return btoa(e).substring(0,15)}()}catch(n){t=""}return n.createElement(e.Provider,{value:t},i)};export{r as default,i as useFingerPrint}; | ||
import n,{useContext as o,createContext as t}from"react";var e=t(void 0),i=function(){return o(e)},r=function(o){var t,i=o.children;try{t=function(){var n=document.createElement("canvas"),o=n.getContext("2d");null==o||o.fillText("canvas fingerprint",50,50);var t={userAgent:null===window||void 0===window?void 0:window.navigator.userAgent,language:null===window||void 0===window?void 0:window.navigator.language,colorDepth:null===window||void 0===window?void 0:window.screen.colorDepth,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,platform:null===window||void 0===window?void 0:window.navigator.platform,canvas:n.toDataURL()},e=JSON.stringify(t);return btoa(e).substring(0,20)}()}catch(n){t=""}return n.createElement(e.Provider,{value:t},i)};export{r as default,i as useFingerPrint}; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),o=e.createContext(void 0);exports.default=function(e){var t,r=e.children;try{t=function(){var e=document.createElement("canvas"),t=e.getContext("2d");null==t||t.fillText("canvas fingerprint",50,50);var n={userAgent:null===window||void 0===window?void 0:window.navigator.userAgent,language:null===window||void 0===window?void 0:window.navigator.language,colorDepth:null===window||void 0===window?void 0:window.screen.colorDepth,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,platform:null===window||void 0===window?void 0:window.navigator.platform,canvas:e.toDataURL()},o=JSON.stringify(n);return btoa(o).substring(0,15)}()}catch(e){t=""}return n.default.createElement(o.Provider,{value:t},r)},exports.useFingerPrint=function(){return e.useContext(o)}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),o=e.createContext(void 0);exports.default=function(e){var t,r=e.children;try{t=function(){var e=document.createElement("canvas"),t=e.getContext("2d");null==t||t.fillText("canvas fingerprint",50,50);var n={userAgent:null===window||void 0===window?void 0:window.navigator.userAgent,language:null===window||void 0===window?void 0:window.navigator.language,colorDepth:null===window||void 0===window?void 0:window.screen.colorDepth,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,platform:null===window||void 0===window?void 0:window.navigator.platform,canvas:e.toDataURL()},o=JSON.stringify(n);return btoa(o).substring(0,20)}()}catch(e){t=""}return n.default.createElement(o.Provider,{value:t},r)},exports.useFingerPrint=function(){return e.useContext(o)}; |
{ | ||
"name": "@givetech/device-fingerprint", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "\"context Provider to store device fingerprint\"", | ||
"main": "dist/index.js", | ||
"module": "dist/index.es.js", | ||
"types": "types/fingerprint.d.ts", | ||
"types": "build/index.d.ts", | ||
"scripts": { | ||
@@ -9,0 +9,0 @@ "build": "npx rollup -c" |
Sorry, the diff of this file is not supported yet
6657