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

kitx

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kitx - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

30

lib/index.js

@@ -83,2 +83,10 @@ 'use strict';

/**
* Generate a nonce string
* @return {String} a nonce string.
*/
exports.makeNonce = function () {
return '' + Math.floor(Math.random() * 1000000000000);
};
/**
* Pad a number as \d\d format

@@ -155,1 +163,23 @@ * @param {Number} num a number that less than 100.

};
/**
* Get the Mac address
* @return {String} the Mac address
*/
exports.getMac = function () {
var interfaces = os.networkInterfaces();
var keys = Object.keys(interfaces);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var addresses = interfaces[key];
for (var j = 0; j < addresses.length; j++) {
var item = addresses[j];
if (!item.internal && item.family === 'IPv4') {
return item.mac;
}
}
}
// without non-internal address
return '00:00:00:00:00:00';
};

2

package.json
{
"name": "kitx",
"version": "1.1.0",
"version": "1.2.0",
"description": "toolkit",

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

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