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

@rsdoctor/utils

Package Overview
Dependencies
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rsdoctor/utils - npm Package Compare versions

Comparing version 0.3.10-beta.0 to 0.3.10-beta.1

24

dist/cjs/common/algorithm.js
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;

@@ -18,2 +20,10 @@ var __export = (target, all) => {

};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

@@ -28,4 +38,4 @@ var algorithm_exports = {};

module.exports = __toCommonJS(algorithm_exports);
var import_zlib = require("zlib");
var import_buffer = require("buffer");
var import_lz4 = __toESM(require("lz4"));
function mergeIntervals(intervals) {

@@ -48,6 +58,14 @@ intervals.sort((a, b) => a[0] - b[0]);

function compressText(input) {
return (0, import_zlib.deflateSync)(input).toString("base64");
const inputBuffer = import_buffer.Buffer.from(input);
let output = import_buffer.Buffer.alloc(import_lz4.default.encodeBound(input.length));
const compressedSize = import_lz4.default.encodeBlock(inputBuffer, output);
output = output.slice(0, compressedSize);
return output.toString("base64");
}
function decompressText(input) {
return (0, import_zlib.inflateSync)(import_buffer.Buffer.from(input, "base64")).toString();
let uncompressedBlock = import_buffer.Buffer.alloc(input.length * 10);
const inputBuffer = import_buffer.Buffer.from(input, "base64");
const uncompressedSize = import_lz4.default.decodeBlock(inputBuffer, uncompressedBlock);
uncompressedBlock = uncompressedBlock.slice(0, uncompressedSize);
return uncompressedBlock.toString("utf-8");
}

@@ -54,0 +72,0 @@ function random(min, max) {

14

dist/esm/common/algorithm.js

@@ -1,3 +0,3 @@

import { deflateSync, inflateSync } from "zlib";
import { Buffer } from "buffer";
import lz4 from "lz4";
function mergeIntervals(intervals) {

@@ -20,6 +20,14 @@ intervals.sort((a, b) => a[0] - b[0]);

function compressText(input) {
return deflateSync(input).toString("base64");
const inputBuffer = Buffer.from(input);
let output = Buffer.alloc(lz4.encodeBound(input.length));
const compressedSize = lz4.encodeBlock(inputBuffer, output);
output = output.slice(0, compressedSize);
return output.toString("base64");
}
function decompressText(input) {
return inflateSync(Buffer.from(input, "base64")).toString();
let uncompressedBlock = Buffer.alloc(input.length * 10);
const inputBuffer = Buffer.from(input, "base64");
const uncompressedSize = lz4.decodeBlock(inputBuffer, uncompressedBlock);
uncompressedBlock = uncompressedBlock.slice(0, uncompressedSize);
return uncompressedBlock.toString("utf-8");
}

@@ -26,0 +34,0 @@ function random(min, max) {

{
"name": "@rsdoctor/utils",
"version": "0.3.10-beta.0",
"version": "0.3.10-beta.1",
"repository": {

@@ -85,5 +85,6 @@ "type": "git",

"lodash": "^4.17.21",
"lz4": "^0.6.5",
"rslog": "^1.2.0",
"strip-ansi": "^6.0.1",
"@rsdoctor/types": "0.3.10-beta.0"
"@rsdoctor/types": "0.3.10-beta.1"
},

@@ -97,2 +98,3 @@ "devDependencies": {

"@types/lodash": "^4.17.0",
"@types/lz4": "^0.6.4",
"@types/node": "^16",

@@ -99,0 +101,0 @@ "tslib": "2.4.1",

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