Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browser-fingerprint

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-fingerprint - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

12

dist/index.js

@@ -7,6 +7,6 @@ 'use strict';

var pad = function pad(str, size) {
return ('000000000' + str).slice(-size);
return (new Array(size + 1).join('0') + str).slice(-size);
};
var count = (function () {
var globalCount = (function () {
var count = 0;

@@ -22,8 +22,8 @@ var window = window || global;

var globalCount = function globalCount() {
return count;
};
var navi = navigator.mimeTypes.length + navigator.userAgent.length;
var fingerprint = pad(navi.toString(36) + globalCount.toString(36), 4);
exports['default'] = function () {
return pad((navigator.mimeTypes.length + navigator.userAgent.length).toString(36) + globalCount().toString(36), 4);
return fingerprint;
};

@@ -30,0 +30,0 @@

'use strict'
let pad = (str, size) => ('000000000' + str).slice(-size)
const pad = (str, size) => (new Array(size + 1).join('0') + str).slice(-size)
let count = (() => {
const globalCount = (() => {
let count = 0
let window = window || global
const window = window || global

@@ -13,11 +13,9 @@ for (let i in window) {

return count;
return count
}())
let globalCount = () => count
const navi = navigator.mimeTypes.length + navigator.userAgent.length
export default () => pad(
(navigator.mimeTypes.length + navigator.userAgent.length).toString(36) +
globalCount().toString(36),
4
)
const fingerprint = pad(navi.toString(36) + globalCount.toString(36), 4)
export default () => fingerprint
{
"name": "browser-fingerprint",
"version": "0.0.1",
"version": "0.1.0",
"description": "Generate a fingerprint of a browser",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

'use strict'
var collision = false;
var collision = false;
import fingerprint from './index.js'
import fingerprint from './dist/index.js'

@@ -7,0 +7,0 @@ let test = require('tape')

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc