Socket
Socket
Sign inDemoInstall

node-fingerprint

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

7

dist/index.js

@@ -8,2 +8,3 @@ 'use strict';

var padding = 2;
var pad = function pad(str, size) {

@@ -13,4 +14,2 @@ return (new Array(size + 1).join('0') + str).slice(-size);

var padding = 2;
var pid = pad(process.pid.toString(36), padding);
var hostname = os.hostname().split('').reduce(function (prev, char) {

@@ -22,4 +21,4 @@ return +prev + char.charCodeAt(0);

exports['default'] = function () {
return pid + hostId;
exports['default'] = function (pid) {
return pad(pid.toString(36), padding) + hostId;
};

@@ -26,0 +25,0 @@

@@ -5,6 +5,5 @@ 'use strict'

const padding = 2
const pad = (str, size) => (new Array(size + 1).join('0') + str).slice(-size)
const padding = 2
const pid = pad(process.pid.toString(36), padding)
const hostname = os.hostname()

@@ -17,2 +16,2 @@ .split('')

export default () => pid + hostId
export default pid => pad(pid.toString(36), padding) + hostId
{
"name": "node-fingerprint",
"version": "1.0.0",
"version": "1.1.0",
"description": "Generates a fingerprint of a node instance",

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

@@ -9,4 +9,4 @@ 'use strict'

t.plan(2)
t.equal(typeof fingerprint(), 'string', 'fingerprint() should return a string');
t.equal(fingerprint(), fingerprint(), 'fingerprints should match');
t.equal(typeof fingerprint(process.pid), 'string', 'fingerprint() should return a string');
t.equal(fingerprint(process.pid), fingerprint(process.pid), 'fingerprints should match');
})
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc