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

@takeshape/util

Package Overview
Dependencies
Maintainers
4
Versions
760
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@takeshape/util - npm Package Compare versions

Comparing version 6.8.0 to 7.3.0

es/encryption.js

6

es/delay.js

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

export const delay = (timeout, value) => new Promise(resolve => {
export const delay = async (timeout, value) => new Promise(resolve => {
setTimeout(resolve, timeout, value);

@@ -6,3 +6,5 @@ });

function randomInt(minimum, maximum) {
return Math.floor(Math.random() * (maximum - minimum + 1) + minimum);
// eslint-disable-next-line security-node/detect-insecure-randomness
const co = Math.random() * (maximum - minimum + 1);
return Math.floor(co + minimum);
} // Decorrelated jitter backoff:

@@ -9,0 +11,0 @@ // https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

@@ -8,3 +8,3 @@ import upperFirst from 'lodash/upperFirst';

export function isUuid(str) {
return Boolean(str.match(/\w{8,}(-\w{4,}){3,}-\w{12,}/));
return Boolean(/\w{8,}(-\w{4,}){3,}-\w{12,}/.exec(str));
}
export declare function arrayContainsAll<T>(a: T[], b: T[]): boolean;
export declare function setIsEqual<T>(a: T[], b: T[]): boolean;
export declare function isDefined<T>(x: T | null | undefined): x is T;
//# sourceMappingURL=arrays.d.ts.map

@@ -7,1 +7,2 @@ export declare const delay: <T>(timeout: number, value?: T | undefined) => Promise<T>;

export declare function backoff(baseDelay: number, maxDelay: number, attempt?: Attempt): Promise<Attempt>;
//# sourceMappingURL=delay.d.ts.map

@@ -9,3 +9,3 @@ "use strict";

const delay = (timeout, value) => new Promise(resolve => {
const delay = async (timeout, value) => new Promise(resolve => {
setTimeout(resolve, timeout, value);

@@ -17,3 +17,5 @@ });

function randomInt(minimum, maximum) {
return Math.floor(Math.random() * (maximum - minimum + 1) + minimum);
// eslint-disable-next-line security-node/detect-insecure-randomness
const co = Math.random() * (maximum - minimum + 1);
return Math.floor(co + minimum);
} // Decorrelated jitter backoff:

@@ -20,0 +22,0 @@ // https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

@@ -5,1 +5,2 @@ /// <reference types="node" />

export declare const gunzip: (input: GzipInputType) => Promise<Buffer>;
//# sourceMappingURL=gzip.d.ts.map

@@ -8,1 +8,2 @@ export * from './types';

export * from './arrays';
//# sourceMappingURL=index.d.ts.map

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

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _types[key]) return;
Object.defineProperty(exports, key, {

@@ -24,2 +25,3 @@ enumerable: true,

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _mime[key]) return;
Object.defineProperty(exports, key, {

@@ -37,2 +39,3 @@ enumerable: true,

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gzip[key]) return;
Object.defineProperty(exports, key, {

@@ -50,2 +53,3 @@ enumerable: true,

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _delay[key]) return;
Object.defineProperty(exports, key, {

@@ -63,2 +67,3 @@ enumerable: true,

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _strings[key]) return;
Object.defineProperty(exports, key, {

@@ -76,2 +81,3 @@ enumerable: true,

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _unixToIso[key]) return;
Object.defineProperty(exports, key, {

@@ -89,2 +95,3 @@ enumerable: true,

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _arrays[key]) return;
Object.defineProperty(exports, key, {

@@ -91,0 +98,0 @@ enumerable: true,

@@ -13,1 +13,2 @@ /**

export declare function shouldCompress(src: string): boolean;
//# sourceMappingURL=mime.d.ts.map
export declare const camelCase: (str: string | string[]) => string;
export declare function upperCamel(str: string | string[]): string;
export declare function isUuid(str: string): boolean;
//# sourceMappingURL=strings.d.ts.map

@@ -24,3 +24,3 @@ "use strict";

function isUuid(str) {
return Boolean(str.match(/\w{8,}(-\w{4,}){3,}-\w{12,}/));
return Boolean(/\w{8,}(-\w{4,}){3,}-\w{12,}/.exec(str));
}
export declare type StringProps<Obj> = {
[K in keyof Required<Obj>]: Obj[K] extends string ? K : never;
}[keyof Obj];
export declare function isObject(obj: unknown): obj is {
[name: string]: unknown;
};
export declare function isObject(obj: unknown): obj is Record<string, unknown>;
export declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export declare type Maybe<T> = T | undefined;
//# sourceMappingURL=types.d.ts.map
export declare function unixToISO(unix: number): string;
//# sourceMappingURL=unix-to-iso.d.ts.map
{
"name": "@takeshape/util",
"version": "6.8.0",
"version": "7.3.0",
"description": "Shared utilities",
"homepage": "https://www.takeshape.io",

@@ -11,2 +12,5 @@ "repository": {

"license": "UNLICENSED",
"engines": {
"node": ">=12 <15"
},
"main": "lib/index.js",

@@ -19,49 +23,21 @@ "module": "es/index.js",

],
"description": "TakeShape Util",
"scripts": {
"lint": "eslint --ext .js --ext .ts --ignore-path .gitignore src",
"lint": "eslint . --ext .js,.ts",
"lint:code:ci": "eslint . --ext .js,.ts --format junit -o \"${HOME}/test-results/${npm_package_name#*\\/}/eslint-results.xml\"",
"test": "jest",
"test-changed": "pnpm run test -- --changedSince=master",
"typecheck": "tsc -p tsconfig.check.json",
"clean": "rimraf lib es tsconfig.tsbuildinfo",
"prepublishOnly": "pnpm run lint && pnpm run test && pnpm run clean && pnpm run build",
"build": "pnpm run build:types && pnpm run build:js && pnpm run build:es",
"build:types": "tsc --emitDeclarationOnly",
"test:ci": "JEST_JUNIT_OUTPUT_DIR=\"${HOME}/test-results/${npm_package_name#*\\/}\" JEST_JUNIT_OUTPUT_NAME=jest-results.xml jest --ci --reporters=default --reporters=jest-junit",
"typecheck": "tsc --noEmit",
"clean": "rimraf lib es build *.tsbuildinfo",
"prepublishOnly": "pnpm lint && pnpm test && pnpm clean && pnpm build",
"build": "pnpm clean && pnpm build:types && pnpm build:js && pnpm build:es && pnpm build:copy",
"build:types": "tsc --emitDeclarationOnly --project tsconfig.build.json",
"build:js": "cross-env BABEL_MODULES=commonjs babel src --out-dir lib --extensions \".js,.ts\" --ignore '**/__tests__'",
"build:es": "cross-env BABEL_MODULES=es babel src --out-dir es --extensions \".js,.ts\" --ignore '**/__tests__'"
"build:es": "cross-env BABEL_MODULES=es babel src --out-dir es --extensions \".js,.ts\" --ignore '**/__tests__'",
"build:copy": "cp -rf build/src/* lib/",
"will-it-blend": "pnpm typecheck && pnpm lint -- --quiet && pnpm test -- --silent --coverage false"
},
"jest": {
"testEnvironment": "node",
"moduleFileExtensions": [
"js",
"json",
"jsx",
"ts",
"tsx",
"d.ts",
"node"
],
"transform": {
"^.+\\.[t|j]sx?$": "babel-jest"
},
"roots": [
"src"
],
"testMatch": [
"**/*.test.js",
"**/*.test.ts"
],
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.js",
"src/**/*.ts"
],
"coveragePathIgnorePatterns": [
"/node_modules/",
".*/__tests__/.*"
]
},
"keywords": [],
"dependencies": {
"lodash": "^4.17.15",
"aws-sdk": "^2.802.0",
"lodash": "^4.17.20",
"mime-types": "^2.1.27",

@@ -71,3 +47,3 @@ "pify": "^5.0.0"

"devDependencies": {
"@types/lodash": "^4.14.157",
"@types/lodash": "^4.14.165",
"@types/mime-types": "^2.1.0",

@@ -74,0 +50,0 @@ "@types/pify": "^3.0.2"

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