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

@bunt/util

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bunt/util - npm Package Compare versions

Comparing version 0.24.5 to 0.24.9

dist/Map/index.d.ts

2

dist/callback.d.ts

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

export declare function resolveOrReject(resolve: (value: void | PromiseLike<void>) => void, reject: (reason?: any) => void): (error?: Error | undefined) => void;
export declare function resolveOrReject(resolve: (value: void | PromiseLike<void>) => void, reject: (reason?: any) => void): (error?: Error) => void;
export declare function filterValueCallback<T>(test: (value: unknown) => boolean, cb: (value: T) => unknown): (value: T) => void;

@@ -17,2 +17,3 @@ export * from "./is";

export * from "./Ref";
export * from "./Map";
export * from "./interfaces";

@@ -33,3 +33,4 @@ "use strict";

__exportStar(require("./Ref"), exports);
__exportStar(require("./Map"), exports);
__exportStar(require("./interfaces"), exports);
//# sourceMappingURL=index.js.map

@@ -12,1 +12,2 @@ export declare type Promisify<T> = T | Promise<T>;

export declare type Fn<A extends any[] = [], R = void> = (...args: A) => R;
export declare type KeyOf<T extends Record<string, any>> = Exclude<keyof T, number | symbol>;
/// <reference types="node" />
import { KeyOf } from "../interfaces";
import { Dict } from "./interfaces";
export declare type EnvKey = string | number | symbol;
export declare type EnvDefaultValue = string | undefined;
export declare type EnvValue = string | undefined;
export declare class Env<T extends Dict<string>> {

@@ -9,9 +9,9 @@ #private;

static factory<T extends Dict<string>>(env?: NodeJS.ProcessEnv): Env<T>;
get<K extends keyof T>(key: K): string | undefined;
get<K extends keyof T>(key: K, defaultValue: string): string;
ensure<K extends keyof T>(key: K): string;
ensure<V, K extends keyof T>(key: K, fn: (value: string) => V): V;
set<K extends keyof T>(key: K, override: string | undefined): this;
as<V, K extends keyof T>(key: K, fn: (value: string) => V): V | undefined;
as<V, K extends keyof T>(key: K, fn: (value: string) => V, defaultValue: V): V;
get<K extends KeyOf<T>>(key: K): string | undefined;
get<K extends KeyOf<T>>(key: K, defaultValue: string): string;
ensure<K extends KeyOf<T>>(key: K): string;
ensure<V, K extends KeyOf<T>>(key: K, fn: (value: string) => V): V;
set<K extends KeyOf<T>>(key: K, override: string | undefined): this;
as<V, K extends KeyOf<T>>(key: K, fn: (value: string) => V): V | undefined;
as<V, K extends KeyOf<T>>(key: K, fn: (value: string) => V, defaultValue: V): V;
}

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

const value = this.get(key);
(0, assert_1.assert)(value, `The key '${key}'' must be provided in runtime environment`);
(0, assert_1.assert)(value, `The key doesn't exists: ${key}`);
return fn

@@ -33,0 +33,0 @@ ? fn(value)

@@ -6,2 +6,2 @@ import { DecoratorTarget } from "./interfaces";

export declare const entriesReverse: <V>(entries?: [string | number | symbol, V][]) => any;
export declare const getClassName: (target: DecoratorTarget, prefix?: string | undefined) => string;
export declare const getClassName: (target: DecoratorTarget, prefix?: string) => string;
{
"name": "@bunt/util",
"version": "0.24.5",
"version": "0.24.9",
"keywords": [

@@ -29,3 +29,3 @@ "typescript"

"license": "MIT",
"gitHead": "4f8c97568f469697b943cad1e5be299b0e08386a"
"gitHead": "5339d2fa4e496960063b7fa2f5d0e4ce43e421e3"
}

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