@gooddata/js-utils
Advanced tools
Comparing version
@@ -9,1 +9,2 @@ /** | ||
export declare function syncCookieWithBootstrap(data: any, localeKeys?: string[], localeDefault?: string, deps?: any): void; | ||
export declare function getUIDByDevice(): string; |
@@ -68,2 +68,14 @@ "use strict"; | ||
exports.syncCookieWithBootstrap = syncCookieWithBootstrap; | ||
function getUIDByDevice() { | ||
var navigatorInfo = window.navigator; | ||
var screenInfo = window.screen; | ||
var uid = navigatorInfo.mimeTypes.length.toString(); | ||
uid += navigatorInfo.userAgent.replace(/\D+/g, ""); | ||
uid += navigatorInfo.plugins.length.toString(); | ||
uid += screenInfo.height || ""; | ||
uid += screenInfo.width || ""; | ||
uid += screenInfo.pixelDepth || ""; | ||
return uid; | ||
} | ||
exports.getUIDByDevice = getUIDByDevice; | ||
//# sourceMappingURL=cookies.js.map |
{ | ||
"name": "@gooddata/js-utils", | ||
"version": "3.9.0", | ||
"version": "3.10.0-alpha-khanh.le-kl-SD-849-gaCookies-2020-03-29T09-52-10-801Z", | ||
"description": "Various utils shared on GoodData frontend", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -10,5 +10,8 @@ GDC JavaScript utilities | ||
1. Install [Node.js](http://nodejs.org) | ||
Install [Node.js](http://nodejs.org) (node 12.16.1, npm v6.13.4) and [Yarn](https://classic.yarnpkg.com) 1.22.4. | ||
2. Run `yarn install` to install the dependencies | ||
Install dependencies: | ||
``` | ||
yarn install --frozen-lockfile | ||
``` | ||
@@ -15,0 +18,0 @@ ## Development |
@@ -67,1 +67,14 @@ // (C) 2007-2019 GoodData Corporation | ||
} | ||
export function getUIDByDevice(): string { | ||
const navigatorInfo: Navigator = window.navigator; | ||
const screenInfo: Screen = window.screen; | ||
let uid: string = navigatorInfo.mimeTypes.length.toString(); | ||
uid += navigatorInfo.userAgent.replace(/\D+/g, ""); | ||
uid += navigatorInfo.plugins.length.toString(); | ||
uid += screenInfo.height || ""; | ||
uid += screenInfo.width || ""; | ||
uid += screenInfo.pixelDepth || ""; | ||
return uid; | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
58676
2.73%1158
2.12%28
12%2
100%1
Infinity%