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

@unrevealed/node

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unrevealed/node - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0-rc.1

lib/constants.js

3

lib/types/UnrevealedClient.d.ts

@@ -35,3 +35,4 @@ import { UnrevealedLogger } from './Logger';

}): Promise<void>;
_track(type: 'user' | 'team', body: unknown): Promise<void>;
private _normalizeKey;
private _track;
private _log;

@@ -38,0 +39,0 @@ private _logError;

@@ -16,3 +16,5 @@ "use strict";

exports.UnrevealedClient = void 0;
const crypto_1 = __importDefault(require("crypto"));
const eventsource_1 = __importDefault(require("eventsource"));
const constants_1 = require("./constants");
const errors_1 = require("./errors");

@@ -76,2 +78,14 @@ const fetch_1 = require("./fetch");

}
if (user &&
featureAccess.userPercentageAccess > 0 &&
this._normalizeKey(`${featureKey}-${user.id}`) <
featureAccess.userPercentageAccess / 100) {
return true;
}
if (team &&
featureAccess.teamPercentageAccess > 0 &&
this._normalizeKey(`${featureKey}-${team.id}`) <
featureAccess.teamPercentageAccess / 100) {
return true;
}
return false;

@@ -96,2 +110,8 @@ }

}
_normalizeKey(key) {
const hash = crypto_1.default.createHash('sha1');
hash.update(key);
const hashHex = hash.digest('hex');
return Number(BigInt(`0x${hashHex}`)) / constants_1.MAX_SHA1;
}
_track(type, body) {

@@ -98,0 +118,0 @@ return __awaiter(this, void 0, void 0, function* () {

{
"name": "@unrevealed/node",
"version": "0.1.1",
"version": "0.2.0-rc.1",
"description": "Unrevealed SDK for Node",

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

Sorry, the diff of this file is not supported yet

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