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

@appolo/utils

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appolo/utils - npm Package Compare versions

Comparing version 8.0.49 to 8.0.50

lib/crypto/murmur.js

7

lib/crypto/hash.js

@@ -6,2 +6,3 @@ "use strict";

const crypto_1 = require("crypto");
const murmur_1 = require("./murmur");
class Hash {

@@ -20,2 +21,5 @@ static hash(value, algorithm = 'sha1', encoding = 'hex') {

}
static sha256(str) {
return Hash.hash(str, "sha256");
}
static hashCode(s, prefix = "_") {

@@ -36,4 +40,7 @@ let h = 0, l = s.length, i = 0;

}
static murmurHash(key, seed = 0) {
return murmur_1.MurmurHash.hash(key, seed);
}
}
exports.Hash = Hash;
//# sourceMappingURL=hash.js.map

12

lib/crypto/hash.ts
import {Strings} from '../strings';
import {BinaryLike, createHash} from "crypto";
import {MurmurHash} from "./murmur";

@@ -11,3 +12,5 @@ export class Hash {

public static hashPlainObject(obj: { [index: string]: string | number | boolean }, algorithm: string = 'sha1', encoding: 'base64' | 'hex' = 'hex'): string {
public static hashPlainObject(obj: {
[index: string]: string | number | boolean
}, algorithm: string = 'sha1', encoding: 'base64' | 'hex' = 'hex'): string {
return Hash.hash(Strings.stringifyObjectValues(obj), algorithm, encoding);

@@ -24,2 +27,5 @@ }

}
public static sha256(str: string): string {
return Hash.hash(str, "sha256");
}

@@ -45,2 +51,6 @@ public static hashCode(s: string, prefix: string = "_"): string {

}
public static murmurHash(key: string, seed: number = 0): number {
return MurmurHash.hash(key, seed);
}
}

10

lib/promises/interfaces.ts

@@ -16,10 +16,2 @@ export interface PromiseFulfilledResult<T> {

export interface IRetry {
retires: number,
max?: number,
random?: number,
min?: number,
fixed?: number,
linear?: number,
exponential?: number
}

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

import {IRetry} from "./interfaces";
import {Promises} from "./promises";
import {IRetry} from "../types/types";

@@ -4,0 +4,0 @@ export class PromiseCreate<T> {

@@ -5,5 +5,6 @@ import {Deferred} from "./deferred";

import {PromiseSome} from "./promiseSome";
import {IRetry, IterateFunction, Resolvable} from "./interfaces";
import { IterateFunction, Resolvable} from "./interfaces";
import {Time} from "../time";
import {PromiseCreate} from "./promiseCreate";
import {IRetry} from "../types/types";

@@ -10,0 +11,0 @@ export class Promises {

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

import {Numbers} from "../index";
import {IRetry} from "./promises/interfaces";
import {IRetry, Numbers} from "../index";

@@ -4,0 +3,0 @@ export class Time {

@@ -10,1 +10,11 @@ export type Immutable<T> = {

export type PartialExcept<T, K extends keyof T> = RecursivePartial<T> & Pick<T, K>;
export interface IRetry {
retires: number,
max?: number,
random?: number,
min?: number,
fixed?: number,
linear?: number,
exponential?: number
}

@@ -20,3 +20,3 @@ {

"main": "./index.js",
"version": "8.0.49",
"version": "8.0.50",
"license": "MIT",

@@ -35,3 +35,2 @@ "repository": {

"@types/chai": "^4.3.5",
"@types/lodash": "^4.14.194",
"@types/mocha": "^10.0.1",

@@ -38,0 +37,0 @@ "@types/node": "^20.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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