@rebilly/risk-data-collector
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -18,3 +18,5 @@ { | ||
"rules": { | ||
"no-restricted-globals": "off", | ||
"import/prefer-default-export": "off" | ||
} | ||
} | ||
} |
{ | ||
"name": "@rebilly/risk-data-collector", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Microlibrary that collects browser data for risk assessment", | ||
"type": "module", | ||
"main": "dist/data-collector.js", | ||
"unpkg": "dist/data-collector.js", | ||
"author": "Rebilly", | ||
@@ -11,4 +12,4 @@ "license": "MIT", | ||
"lint": "eslint src", | ||
"build": "parcel build src/data-collector.js --global collector", | ||
"build:watch": "parcel watch src/data-collector.js --global collector", | ||
"build": "parcel build src/data-collector.js --global RiskDataCollector", | ||
"build:watch": "parcel watch src/data-collector.js --global RiskDataCollector", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
@@ -15,0 +16,0 @@ }, |
@@ -11,11 +11,51 @@ # risk-data-collector | ||
## Data collected | ||
* Accept header | ||
* IP address | ||
* Java enabled | ||
* Language | ||
* Display color depth | ||
* Screen height | ||
* Screen width | ||
* Time zone offset | ||
* User-agent header | ||
* Fingerprint hash | ||
``` | ||
colorDepth | ||
javaEnabled | ||
language | ||
screenHeight | ||
screenWidth | ||
timeZoneOffset | ||
deviceFingerprintHash | ||
``` | ||
## Usage | ||
`risk-data-collector` is distributed in two ways: | ||
1. Via a CDN link | ||
The library becomes available under the `RiskDataCollector` global namespace and can be used like so: | ||
```html | ||
<html> | ||
<head> | ||
<script src="https://unpkg.com/@rebilly/risk-data-collector"></script> | ||
</head> | ||
<body> | ||
<script type="text/javascript"> | ||
(async () => { | ||
const browserData = await RiskDataCollector.collectData(); | ||
console.log(`browserData is: ${JSON.stringify(browserData)}`) | ||
})() | ||
</script> | ||
</body> | ||
<html> | ||
``` | ||
<br> | ||
2. As an npm package | ||
``` | ||
yarn add @rebilly/risk-data-collector | ||
npm install @rebilly/risk-data-collector | ||
``` | ||
Which can be imported and used like so: | ||
```js | ||
import {collectData} from '@rebilly/risk-data-collector'; | ||
(async () => { | ||
const browserData = await collectData(); | ||
console.log(`browserData is: ${JSON.stringify(browserData)}`) | ||
})() | ||
``` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
61
165024
239
3