New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clerobee

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clerobee - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

15

lib/clerobee.js

@@ -39,5 +39,2 @@ var os = require('os');

}
function padHex(hex, digits) {
return hex.length >= digits ? hex.substring(0, digits) : this.getRandom(digits - hex.length) + hex;
}

@@ -50,2 +47,5 @@ var Clerobee = function Clerobee( length ) {

ClerobeeProto.padHex = function(hex, digits) {
return hex.length >= digits ? hex.substring(0, digits) : this.getRandom(digits - hex.length) + hex;
};
ClerobeeProto.derive = function( config, masterID ) {

@@ -95,3 +95,3 @@ var lengthP = config.timeLength + config.processLength + config.networkLength;

var refString = this.cryptify( JSON.stringify( reference ), config.randomLength );
return this.innerGenerate.bind( self, config, function( ){ return padHex.bind(self, refString, config.randomLength )(); } )();
return this.innerGenerate.bind( self, config, function( ){ return self.padHex(refString, config.randomLength); } )();
};

@@ -124,2 +124,3 @@ ClerobeeProto.generate = function( basis, extra ) {

ClerobeeProto.getRandom = function( randomLength, masterRandom, masterNano) {
var self = this;
randomLength = randomLength || this.config.randomLength;

@@ -134,3 +135,3 @@

random += padHex( Number( parseInt(sliceR, 36) + parseInt(masterNano, 36) ).toString(36), length );
random += self.padHex( Number( parseInt(sliceR, 36) + parseInt(masterNano, 36) ).toString(36), length );
}

@@ -171,5 +172,5 @@ else{

return padHex( Number( value ).toString(36), length);
return this.padHex( Number( value ).toString(36), length);
};
module.exports = exports = Clerobee;
module.exports = exports = Clerobee;
{
"name": "clerobee",
"version": "0.1.0",
"version": "0.2.0",
"description": "A featureful dependency-free UID generator",

@@ -48,3 +48,3 @@ "keywords": [

},
"_id": "clerobee@0.1.0"
"_id": "clerobee@0.2.0"
}
Clerobee - a featureful UID generator
[![NPM](https://nodei.co/npm/clerobee.png)](https://nodei.co/npm/clerobee/)
========

@@ -3,0 +6,0 @@ [clerobee](https://github.com/imrefazekas/clerobee) is a very handy dependency-free utility library allowing to generate UIDs considering actual time, network resources and process in a distributed environment.

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