@storm-stack/utilities
Advanced tools
Comparing version 1.17.2 to 1.18.0
1115
dist/index.d.ts
@@ -1,1115 +0,10 @@ | ||
import { Buffer as Buffer_2 } from 'buffer/'; | ||
declare const $NestedValue: unique symbol; | ||
export { $NestedValue } | ||
export { $NestedValue as $NestedValue_alias_1 } | ||
declare interface Abstract<T> { | ||
prototype: T; | ||
} | ||
export { Abstract } | ||
export { Abstract as Abstract_alias_1 } | ||
declare type AnyCase<T extends IndexType> = string extends T ? string : T extends `${infer F1}${infer F2}${infer R}` ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}` : T extends `${infer F}${infer R}` ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}` : typeof EMPTY_STRING; | ||
export { AnyCase } | ||
export { AnyCase as AnyCase_alias_1 } | ||
/** | ||
* This method returns the first argument provided to it. | ||
* A base utility library used by Storm Software for building TypeScript applications. | ||
* | ||
* @remarks | ||
* For more info, please see {@link https://lodash.com/docs/4.17.15#identity | the original Lodash documentation}. | ||
* The package is divided into four main sections: | ||
* - {@link HelperFns | HelperFns} - A collection of helper functions | ||
* | ||
* @param value - The value to return. | ||
* @returns The value provided. | ||
* @packageDocumentation | ||
*/ | ||
declare function argIdentity(value: any): any; | ||
export { argIdentity } | ||
export { argIdentity as argIdentity_alias_1 } | ||
export { argIdentity as argIdentity_alias_2 } | ||
declare type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never; | ||
export { ArrayElement } | ||
export { ArrayElement as ArrayElement_alias_1 } | ||
declare type BrowserNativeObject = Date | FileList | File; | ||
export { BrowserNativeObject } | ||
export { BrowserNativeObject as BrowserNativeObject_alias_1 } | ||
/** | ||
* Convert the input string to camel case. | ||
* | ||
* @remarks | ||
* "thisIsAnExample" | ||
* | ||
* @param input - The input string. | ||
* @returns The camel-cased string. | ||
*/ | ||
declare const camelCase: (input?: string) => string | undefined; | ||
export { camelCase } | ||
export { camelCase as camelCase_alias_1 } | ||
export { camelCase as camelCase_alias_2 } | ||
declare interface ClassTypeCheckable<T> extends ITyped { | ||
/** | ||
* Run type check on the given value | ||
* @param value - The value to check | ||
* @returns True if the value is of the type of the class | ||
*/ | ||
isTypeOf: (value: unknown) => value is T; | ||
} | ||
export { ClassTypeCheckable } | ||
export { ClassTypeCheckable as ClassTypeCheckable_alias_1 } | ||
declare interface Clonable<T> { | ||
clone(): T; | ||
} | ||
export { Clonable } | ||
export { Clonable as Clonable_alias_1 } | ||
declare type Collection = IArguments | unknown[] | Map<unknown, unknown> | Record<string | number | symbol, unknown> | Set<unknown>; | ||
export { Collection } | ||
export { Collection as Collection_alias_1 } | ||
/** | ||
* Convert the input string to constant case. | ||
* | ||
* @remarks | ||
* "THIS_IS_AN_EXAMPLE" | ||
* | ||
* @param input - The input string. | ||
* @returns The constant-cased string. | ||
*/ | ||
declare const constantCase: (input?: string) => string | undefined; | ||
export { constantCase } | ||
export { constantCase as constantCase_alias_1 } | ||
export { constantCase as constantCase_alias_2 } | ||
/** | ||
* copy value with customizer function | ||
* | ||
* @private | ||
* @param value | ||
* @param type | ||
*/ | ||
declare function copy(value: unknown, valueType: string, customizer?: ((value: unknown, type: string) => unknown) | null): unknown; | ||
export { copy } | ||
export { copy as copy_alias_1 } | ||
export { copy as copy_alias_2 } | ||
declare const Crypto_2: Crypto | undefined; | ||
export { Crypto_2 as Crypto } | ||
export { Crypto_2 as Crypto_alias_1 } | ||
export { Crypto_2 as Crypto_alias_2 } | ||
/** | ||
* Deep copy an object/array/value | ||
* | ||
* @param value - The value to copy | ||
* @param options - The options | ||
*/ | ||
declare function deepCopy<T>(value: T, options?: { | ||
customizer?: (value: unknown, type: string) => unknown; | ||
}): T; | ||
export { deepCopy } | ||
export { deepCopy as deepCopy_alias_1 } | ||
export { deepCopy as deepCopy_alias_2 } | ||
/** | ||
* Deep merge two objects | ||
* | ||
* @param target - The target object | ||
* @param source - The source object | ||
* @param options - The options object | ||
* @returns The merged object | ||
*/ | ||
declare const deepMerge: { | ||
<X = any, Y = any, Z = X & Y>(target: X, source: Y, options?: any): Z; | ||
all(array: any[], options?: any): any; | ||
}; | ||
export { deepMerge } | ||
export { deepMerge as deepMerge_alias_1 } | ||
export { deepMerge as deepMerge_alias_2 } | ||
declare type DeepPartial<T> = T extends BrowserNativeObject | NestedValue ? T : { | ||
[K in keyof T]?: DeepPartial<T[K]>; | ||
}; | ||
export { DeepPartial } | ||
export { DeepPartial as DeepPartial_alias_1 } | ||
declare const EMPTY_OBJECT: {}; | ||
export { EMPTY_OBJECT } | ||
export { EMPTY_OBJECT as EMPTY_OBJECT_alias_1 } | ||
declare const EMPTY_STRING = ""; | ||
export { EMPTY_STRING } | ||
export { EMPTY_STRING as EMPTY_STRING_alias_1 } | ||
declare type EmptyObject = { | ||
[K in string | number]: never; | ||
}; | ||
export { EmptyObject } | ||
export { EmptyObject as EmptyObject_alias_1 } | ||
/** | ||
* Create a type from an object type without certain keys. | ||
* | ||
* @remarks We recommend setting the `requireExactProps` option to `true`. | ||
* @remarks This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically. | ||
* @remarks This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)). | ||
* @category Object | ||
*/ | ||
declare type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = { | ||
requireExactProps: false; | ||
}> = { | ||
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType]; | ||
} & (Options["requireExactProps"] extends true ? Partial<Record<KeysType, never>> : Record<string, never>); | ||
export { Except } | ||
export { Except as Except_alias_1 } | ||
declare type ExceptOptions = { | ||
/** | ||
Disallow assigning non-specified properties. | ||
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`. | ||
@default false | ||
*/ | ||
requireExactProps?: boolean; | ||
}; | ||
declare type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : KeyType extends ExcludeType ? never : KeyType; | ||
export { Filter } | ||
export { Filter as Filter_alias_1 } | ||
/** | ||
* Flatten an object. | ||
* | ||
* @param obj - The object to flatten. | ||
* @param prefix - The prefix to use. | ||
* @param keyStringFn - The function to use to convert the key to a string. | ||
* @returns The flattened object. | ||
*/ | ||
declare const flattenObject: (obj: any, prefix?: string, keyStringFn?: (input?: string) => string | undefined) => any; | ||
export { flattenObject } | ||
export { flattenObject as flattenObject_alias_1 } | ||
export { flattenObject as flattenObject_alias_2 } | ||
/** | ||
* Gets the `toStringTag` of `obj`. | ||
* | ||
* @param value The obj to query. | ||
* @returns Returns the `toStringTag`. | ||
*/ | ||
declare const getObjectTag: (value: unknown) => string; | ||
export { getObjectTag } | ||
export { getObjectTag as getObjectTag_alias_1 } | ||
export { getObjectTag as getObjectTag_alias_2 } | ||
/** | ||
* Returns an array of unique values from the given array. | ||
* | ||
* @param arr - The array to get unique values from. | ||
* @returns An array of unique values. | ||
*/ | ||
declare const getUnique: <T = any>(arr: T[]) => T[]; | ||
export { getUnique } | ||
export { getUnique as getUnique_alias_1 } | ||
export { getUnique as getUnique_alias_2 } | ||
/** | ||
* Get the WebCrypto object | ||
* | ||
* @remarks | ||
* This helper function is used to get the WebCrypto object. If the object is not available, an error will be thrown. | ||
* | ||
* @returns The WebCrypto object | ||
*/ | ||
declare const getWebCrypto: () => Crypto; | ||
export { getWebCrypto } | ||
export { getWebCrypto as getWebCrypto_alias_1 } | ||
export { getWebCrypto as getWebCrypto_alias_2 } | ||
declare interface IIdentity<T = string> { | ||
id: T; | ||
} | ||
export { IIdentity } | ||
export { IIdentity as IIdentity_alias_1 } | ||
/** | ||
* The declaration of a ***dictionary-type*** object | ||
*/ | ||
declare type Indexable = { | ||
[index: IndexType]: any; | ||
}; | ||
export { Indexable } | ||
export { Indexable as Indexable_alias_1 } | ||
/** | ||
* The valid types of the index for an `Indexable` type object | ||
*/ | ||
declare type IndexType = string | number | symbol; | ||
export { IndexType } | ||
export { IndexType as IndexType_alias_1 } | ||
/** | ||
* Check if the provided value's type is "array-like" | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is "array-like" | ||
*/ | ||
declare const isArrayLike: (value: any) => boolean; | ||
export { isArrayLike } | ||
export { isArrayLike as isArrayLike_alias_1 } | ||
export { isArrayLike as isArrayLike_alias_2 } | ||
/** | ||
* Check if the provided value's type is `AsyncIterable` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is `AsyncIterable` | ||
*/ | ||
declare const isAsyncIterable: (value: unknown) => value is AsyncIterable<unknown>; | ||
export { isAsyncIterable } | ||
export { isAsyncIterable as isAsyncIterable_alias_1 } | ||
export { isAsyncIterable as isAsyncIterable_alias_2 } | ||
/** | ||
* Checks if `value` is classified as a `bigint` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isDate(37n) | ||
* // => true | ||
* | ||
* isBigInt(37) | ||
* // => false | ||
* ``` | ||
* | ||
* @param value The obj to check. | ||
* @returns Returns `true` if `value` is a bigint object, else `false`. | ||
*/ | ||
declare const isBigInt: (value: unknown) => value is bigint; | ||
export { isBigInt } | ||
export { isBigInt as isBigInt_alias_1 } | ||
export { isBigInt as isBigInt_alias_2 } | ||
/** | ||
* Check if the provided value's type is `boolean` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `boolean` | ||
*/ | ||
declare const isBoolean: (value: unknown) => value is boolean; | ||
export { isBoolean } | ||
export { isBoolean as isBoolean_alias_1 } | ||
export { isBoolean as isBoolean_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Buffer` | ||
*/ | ||
declare const isBuffer: typeof Buffer_2.isBuffer; | ||
export { isBuffer } | ||
export { isBuffer as isBuffer_alias_1 } | ||
export { isBuffer as isBuffer_alias_2 } | ||
declare const isBufferExists: boolean; | ||
export { isBufferExists } | ||
export { isBufferExists as isBufferExists_alias_1 } | ||
export { isBufferExists as isBufferExists_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Collection` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Collection` | ||
*/ | ||
declare function isCollection(value: any): value is Collection; | ||
export { isCollection } | ||
export { isCollection as isCollection_alias_1 } | ||
export { isCollection as isCollection_alias_2 } | ||
/** | ||
* Checks if `value` is classified as a `Date` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isDate(new Date) | ||
* // => true | ||
* | ||
* isDate('Mon April 23 2012') | ||
* // => false | ||
* ``` | ||
* | ||
* @param value - The value to check. | ||
* @returns Returns `true` if `obj` is a date object, else `false`. | ||
*/ | ||
declare const isDate: (value: unknown) => value is Date; | ||
export { isDate } | ||
export { isDate as isDate_alias_1 } | ||
export { isDate as isDate_alias_2 } | ||
/** | ||
* The function checks if the code is **NOT** running in production. | ||
* | ||
* @remarks | ||
* **Please note:** This function does **not** check if the mode equals 'development' specifically. | ||
* | ||
* To check for the 'development' mode specifically, run: | ||
* | ||
* ```typescript | ||
* const isDevelopmentSpecifically = isMode("development"); | ||
* ``` | ||
*/ | ||
declare const isDevelopment: () => boolean; | ||
export { isDevelopment } | ||
export { isDevelopment as isDevelopment_alias_1 } | ||
export { isDevelopment as isDevelopment_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` or `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` or `undefined` | ||
*/ | ||
declare const isEmpty: (value: unknown) => boolean; | ||
export { isEmpty } | ||
export { isEmpty as isEmpty_alias_1 } | ||
export { isEmpty as isEmpty_alias_2 } | ||
/** | ||
* Check if the provided value's type is `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `{}` | ||
*/ | ||
declare const isEmptyObject: (value: unknown) => value is {}; | ||
export { isEmptyObject } | ||
export { isEmptyObject as isEmptyObject_alias_1 } | ||
export { isEmptyObject as isEmptyObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` or `undefined` or `{}` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` or `undefined` or `{}` | ||
*/ | ||
declare const isEmptyOrEmptyObject: (value: unknown) => boolean; | ||
export { isEmptyOrEmptyObject } | ||
export { isEmptyOrEmptyObject as isEmptyOrEmptyObject_alias_1 } | ||
export { isEmptyOrEmptyObject as isEmptyOrEmptyObject_alias_2 } | ||
/** | ||
* Determine if the type is string and is empty | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `""` | ||
*/ | ||
declare const isEmptyString: (value: unknown) => value is string; | ||
export { isEmptyString } | ||
export { isEmptyString as isEmptyString_alias_1 } | ||
export { isEmptyString as isEmptyString_alias_2 } | ||
/** | ||
* Returns a boolean for whether the two given types are equal. | ||
* | ||
* @remarks Use-cases: If you want to make a conditional branch based on the result of a comparison of two types. | ||
* @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650 | ||
* @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796 | ||
* @category Type Guard | ||
* @category Utilities | ||
*/ | ||
declare type IsEqual<A, B> = (<G>() => G extends A ? 1 : 2) extends <G>() => G extends B ? 1 : 2 ? true : false; | ||
export { IsEqual } | ||
export { IsEqual as IsEqual_alias_1 } | ||
declare function isEqual(a: any, b: any): boolean; | ||
export { isEqual } | ||
export { isEqual as isEqual_alias_1 } | ||
export { isEqual as isEqual_alias_2 } | ||
declare interface ISequenced { | ||
/** | ||
* The sequence number (version, or event counter, etc.) of the record | ||
*/ | ||
sequence: number; | ||
} | ||
export { ISequenced } | ||
export { ISequenced as ISequenced_alias_1 } | ||
/** | ||
* Checks if `obj` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, | ||
* `SyntaxError`, `TypeError`, or `URIError` object. | ||
* | ||
* @example | ||
* ```typescript | ||
* isError(new Error) | ||
* // => true | ||
* | ||
* isError(Error) | ||
* // => false | ||
* ``` | ||
* | ||
* @param obj - The obj to check. | ||
* @returns Returns `true` if `obj` is an error object, else `false`. | ||
*/ | ||
declare const isError: (obj: unknown) => obj is Error; | ||
export { isError } | ||
export { isError as isError_alias_1 } | ||
export { isError as isError_alias_2 } | ||
/** | ||
* Check if the provided value's type is a float | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` and is a float | ||
*/ | ||
declare const isFloat: (value: any) => value is number; | ||
export { isFloat } | ||
export { isFloat as isFloat_alias_1 } | ||
export { isFloat as isFloat_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Function` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Function` | ||
*/ | ||
declare const isFunction: (value: unknown) => value is ((params?: unknown) => unknown) & ((args?: any[]) => any); | ||
export { isFunction } | ||
export { isFunction as isFunction_alias_1 } | ||
export { isFunction as isFunction_alias_2 } | ||
/** | ||
* Check if the provided value's type is an integer | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` and is an integer | ||
*/ | ||
declare const isInt: (value: any) => value is number; | ||
export { isInt } | ||
export { isInt as isInt_alias_1 } | ||
export { isInt as isInt_alias_2 } | ||
declare const isMergeableObject: (value: any) => boolean; | ||
export { isMergeableObject } | ||
export { isMergeableObject as isMergeableObject_alias_1 } | ||
export { isMergeableObject as isMergeableObject_alias_2 } | ||
/** | ||
* Check the current runtime mode of the process | ||
* | ||
* @param mode - The mode to check the current process's mode against | ||
* @returns An indicator specifying if the current runtime matches the `mode` parameter | ||
*/ | ||
declare const isMode: (mode: string) => boolean; | ||
export { isMode } | ||
export { isMode as isMode_alias_1 } | ||
export { isMode as isMode_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Object` and is not `null` or `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined` | ||
*/ | ||
export declare const isNonNullObject: (value: any) => value is object; | ||
/** | ||
* The inverse of the `isEmptyObject` function | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined` or `{}` | ||
*/ | ||
declare const isNotEmpty: (value: unknown) => value is {}; | ||
export { isNotEmpty } | ||
export { isNotEmpty as isNotEmpty_alias_1 } | ||
export { isNotEmpty as isNotEmpty_alias_2 } | ||
/** | ||
* Check if the provided value's type is `null` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `null` | ||
*/ | ||
declare const isNull: (value: unknown) => value is null; | ||
export { isNull } | ||
export { isNull as isNull_alias_1 } | ||
export { isNull as isNull_alias_2 } | ||
/** | ||
* Check if the provided value's type is `number` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `number` | ||
*/ | ||
declare const isNumber: (value: unknown) => value is number; | ||
export { isNumber } | ||
export { isNumber as isNumber_alias_1 } | ||
export { isNumber as isNumber_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Object` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Object` | ||
*/ | ||
declare const isObject: (value: unknown) => value is object; | ||
export { isObject } | ||
export { isObject as isObject_alias_1 } | ||
export { isObject as isObject_alias_2 } | ||
/** | ||
* Checks if `value` is object-like. A value is object-like if it's not `null` | ||
* and has a `typeof` result of "object". | ||
* | ||
* @example | ||
* ```typescript | ||
* isObjectLike({}) | ||
* // => true | ||
* | ||
* isObjectLike([1, 2, 3]) | ||
* // => true | ||
* | ||
* isObjectLike(Function) | ||
* // => false | ||
* | ||
* isObjectLike(null) | ||
* // => false | ||
* ``` | ||
* | ||
* @param value - The value to check. | ||
* @returns Returns `true` if `value` is object-like, else `false`. | ||
*/ | ||
declare const isObjectLike: (obj: unknown) => boolean; | ||
export { isObjectLike } | ||
export { isObjectLike as isObjectLike_alias_1 } | ||
export { isObjectLike as isObjectLike_alias_2 } | ||
/** | ||
* Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`. | ||
* | ||
* @example | ||
* ```typescript | ||
* function Foo() { | ||
* this.a = 1 | ||
* } | ||
* | ||
* isPlainObject(new Foo) | ||
* // => false | ||
* | ||
* isPlainObject([1, 2, 3]) | ||
* // => false | ||
* | ||
* isPlainObject({ 'x': 0, 'y': 0 }) | ||
* // => true | ||
* | ||
* isPlainObject(Object.create(null)) | ||
* // => true | ||
* ``` | ||
* | ||
* @param obj The value to check. | ||
* @returns Returns `true` if `obj` is a plain object, else `false`. | ||
*/ | ||
declare const isPlainObject: (obj: unknown) => boolean; | ||
export { isPlainObject } | ||
export { isPlainObject as isPlainObject_alias_1 } | ||
export { isPlainObject as isPlainObject_alias_2 } | ||
/** | ||
* Check if the provided value's type is a built-in primitive | ||
* | ||
* @remarks | ||
* The full list of primitive types includes: | ||
* * `number` | ||
* * `string` | ||
* * `boolean` | ||
* * `symbol` | ||
* * `bigint` | ||
* * `undefined` | ||
* * `null` | ||
* | ||
* @param obj - The value to type check | ||
* @returns An indicator specifying if the value provided is a built-in primitive | ||
*/ | ||
declare const isPrimitive: (value: unknown) => boolean; | ||
export { isPrimitive } | ||
export { isPrimitive as isPrimitive_alias_1 } | ||
export { isPrimitive as isPrimitive_alias_2 } | ||
/** | ||
* The function checks if the code is running in production. | ||
*/ | ||
declare const isProduction: () => boolean; | ||
export { isProduction } | ||
export { isProduction as isProduction_alias_1 } | ||
export { isProduction as isProduction_alias_2 } | ||
/** | ||
* Check if the provided value's type is a promise | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type a promise | ||
*/ | ||
declare const isPromise: (value: unknown) => value is Promise<unknown>; | ||
export { isPromise } | ||
export { isPromise as isPromise_alias_1 } | ||
export { isPromise as isPromise_alias_2 } | ||
/** | ||
* Check if the provided value's type is a promise-like | ||
* | ||
* @remarks | ||
* A promise-like is an object that has a `then` function | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type a promise-like | ||
*/ | ||
declare const isPromiseLike: (value: unknown) => value is PromiseLike<unknown>; | ||
export { isPromiseLike } | ||
export { isPromiseLike as isPromiseLike_alias_1 } | ||
export { isPromiseLike as isPromiseLike_alias_2 } | ||
/** | ||
* Check if the provided value is a {@link https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 React Element}. | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type {@link https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 React Element} | ||
*/ | ||
declare const isReactElement: (value: any) => boolean; | ||
export { isReactElement } | ||
export { isReactElement as isReactElement_alias_1 } | ||
export { isReactElement as isReactElement_alias_2 } | ||
/** | ||
* Check if the provided value's type is a ref | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type ref | ||
*/ | ||
declare const isRef: <TRef = unknown>(value: unknown) => value is RefObject<TRef>; | ||
export { isRef } | ||
export { isRef as isRef_alias_1 } | ||
export { isRef as isRef_alias_2 } | ||
/** | ||
* The function checks if the code is running in | ||
* the browser (and not on the server). | ||
*/ | ||
declare const isRuntimeClient: () => boolean; | ||
export { isRuntimeClient } | ||
export { isRuntimeClient as isRuntimeClient_alias_1 } | ||
export { isRuntimeClient as isRuntimeClient_alias_2 } | ||
/** | ||
* The function checks if the code is running on | ||
* the server (and not in the browser). | ||
*/ | ||
declare const isRuntimeServer: () => boolean; | ||
export { isRuntimeServer } | ||
export { isRuntimeServer as isRuntimeServer_alias_1 } | ||
export { isRuntimeServer as isRuntimeServer_alias_2 } | ||
/** | ||
* Check if the provided value's type is SelectOption | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the object provided is of type SelectOption | ||
*/ | ||
declare const isSelectOption: (value: unknown) => value is SelectOption; | ||
export { isSelectOption } | ||
export { isSelectOption as isSelectOption_alias_1 } | ||
export { isSelectOption as isSelectOption_alias_2 } | ||
/** | ||
* The inverse of the `isEmpty` function | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined` | ||
*/ | ||
declare const isSet: (value: unknown) => value is {}; | ||
export { isSet } | ||
export { isSet as isSet_alias_1 } | ||
export { isSet as isSet_alias_2 } | ||
/** | ||
* Check if the provided value's type is an object with some fields set | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is an object with some fields se | ||
*/ | ||
declare const isSetObject: (value: unknown) => value is object; | ||
export { isSetObject } | ||
export { isSetObject as isSetObject_alias_1 } | ||
export { isSetObject as isSetObject_alias_2 } | ||
/** | ||
* Determine if the type is string and is not empty (length greater than zero) | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `string` and length greater than zero | ||
*/ | ||
declare const isSetString: (value: unknown) => value is string; | ||
export { isSetString } | ||
export { isSetString as isSetString_alias_1 } | ||
export { isSetString as isSetString_alias_2 } | ||
/** | ||
* Determine if the type is string | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `string` | ||
*/ | ||
declare const isString: (value: unknown) => value is string; | ||
export { isString } | ||
export { isString as isString_alias_1 } | ||
export { isString as isString_alias_2 } | ||
/** | ||
* Check if the provided value's type is `Symbol` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `Symbol` | ||
*/ | ||
declare const isSymbol: (value: unknown) => value is symbol; | ||
export { isSymbol } | ||
export { isSymbol as isSymbol_alias_1 } | ||
export { isSymbol as isSymbol_alias_2 } | ||
/** | ||
* Check if the provided value has a `__typename` property | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided has a `__typename` property | ||
*/ | ||
declare const isTyped: (value: unknown) => value is ITyped; | ||
export { isTyped } | ||
export { isTyped as isTyped_alias_1 } | ||
export { isTyped as isTyped_alias_2 } | ||
/** | ||
* Check if the provided value's type is `undefined` | ||
* | ||
* @param value - The value to type check | ||
* @returns An indicator specifying if the value provided is of type `undefined` | ||
*/ | ||
declare const isUndefined: (value: unknown) => boolean; | ||
export { isUndefined } | ||
export { isUndefined as isUndefined_alias_1 } | ||
export { isUndefined as isUndefined_alias_2 } | ||
declare interface ITyped { | ||
/** | ||
* The type of the record | ||
*/ | ||
__typename: string; | ||
} | ||
export { ITyped } | ||
export { ITyped as ITyped_alias_1 } | ||
declare interface IVersioned { | ||
version: number; | ||
} | ||
export { IVersioned } | ||
export { IVersioned as IVersioned_alias_1 } | ||
/** | ||
* Convert the input string to kebab case. | ||
* | ||
* @remarks | ||
* "this-is-an-example" | ||
* | ||
* @param input - The input string. | ||
* @returns The kebab-cased string. | ||
*/ | ||
declare const kebabCase: (input?: string) => string | undefined; | ||
export { kebabCase } | ||
export { kebabCase as kebabCase_alias_1 } | ||
export { kebabCase as kebabCase_alias_2 } | ||
declare type LiteralUnion<T extends U, U extends Primitive> = T | (U & { | ||
_?: never; | ||
}); | ||
export { LiteralUnion } | ||
export { LiteralUnion as LiteralUnion_alias_1 } | ||
/** | ||
* Lower case the first character of an input string. | ||
* | ||
* @remarks | ||
* "tHISISANEXAMPLE" | ||
* | ||
* @param input - The input string. | ||
* @returns The lower-cased string. | ||
*/ | ||
declare const lowerCaseFirst: (input?: string) => string | undefined; | ||
export { lowerCaseFirst } | ||
export { lowerCaseFirst as lowerCaseFirst_alias_1 } | ||
export { lowerCaseFirst as lowerCaseFirst_alias_2 } | ||
declare type MaybePromise<T> = T | Promise<T>; | ||
export { MaybePromise } | ||
export { MaybePromise as MaybePromise_alias_1 } | ||
declare type NestedValue<TValue extends object = object> = { | ||
[$NestedValue]: never; | ||
} & TValue; | ||
export { NestedValue } | ||
export { NestedValue as NestedValue_alias_1 } | ||
declare type Newable<T> = new (..._args: never[]) => T; | ||
export { Newable } | ||
export { Newable as Newable_alias_1 } | ||
declare const NEWLINE_STRING = "\r\n"; | ||
export { NEWLINE_STRING } | ||
export { NEWLINE_STRING as NEWLINE_STRING_alias_1 } | ||
declare type NonUndefined<T> = T extends undefined ? never : T; | ||
export { NonUndefined } | ||
export { NonUndefined as NonUndefined_alias_1 } | ||
/** | ||
* A no op, or no-op, function for no operation | ||
* | ||
* @remarks Please see {@link https://dev.to/praneshpsg239/noop-in-javascript-478h this article} for more information. | ||
* | ||
* @param params - An optional parameter passed to the function. It can be anything (but is not used in any way) | ||
*/ | ||
declare const noop: (params?: unknown) => void; | ||
export { noop } | ||
export { noop as noop_alias_1 } | ||
export { noop as noop_alias_2 } | ||
/** | ||
* Convert the input string to pascal case. | ||
* | ||
* @remarks | ||
* "ThisIsAnExample" | ||
* | ||
* @param input - The input string. | ||
* @returns The pascal-cased string. | ||
*/ | ||
declare const pascalCase: (input?: string) => string | undefined; | ||
export { pascalCase } | ||
export { pascalCase as pascalCase_alias_1 } | ||
export { pascalCase as pascalCase_alias_2 } | ||
/** | ||
* Make all characters lowercase and add a period in between each word | ||
* | ||
* @remarks | ||
* "this.is.an.example" | ||
* | ||
* @param input - The input string. | ||
* @returns The period-split string. | ||
*/ | ||
declare const periodSplit: (input?: string) => string | undefined; | ||
export { periodSplit } | ||
export { periodSplit as periodSplit_alias_1 } | ||
export { periodSplit as periodSplit_alias_2 } | ||
/** | ||
* Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive). | ||
* | ||
* @category Type | ||
*/ | ||
declare type Primitive = null | undefined | string | number | boolean | symbol | bigint; | ||
export { Primitive } | ||
export { Primitive as Primitive_alias_1 } | ||
/** | ||
* Check if the provided object has the provided property | ||
* | ||
* @param object - The object to check | ||
* @param propertyKey - The property to check | ||
* @returns An indicator specifying if the object has the provided property | ||
*/ | ||
declare const propertyExists: (object: any, propertyKey: PropertyKey) => boolean; | ||
export { propertyExists } | ||
export { propertyExists as propertyExists_alias_1 } | ||
export { propertyExists as propertyExists_alias_2 } | ||
/** | ||
* Check if the provided object has the provided property and if it's safe to merge | ||
* | ||
* @param object - The object to check | ||
* @param propertyKey - The property to check | ||
* @returns An indicator specifying if the object has the provided property and if it's safe to merge | ||
*/ | ||
declare const propertyUnsafe: (object: any, propertyKey: PropertyKey) => boolean; | ||
export { propertyUnsafe } | ||
export { propertyUnsafe as propertyUnsafe_alias_1 } | ||
export { propertyUnsafe as propertyUnsafe_alias_2 } | ||
declare type ReducerFunction<TState, TAction> = (state: TState, action: TAction) => TState; | ||
export { ReducerFunction } | ||
export { ReducerFunction as ReducerFunction_alias_1 } | ||
declare interface RefObject<T> { | ||
current: T; | ||
} | ||
export { RefObject } | ||
export { RefObject as RefObject_alias_1 } | ||
/** | ||
* Removes empty items from an array | ||
* | ||
* @param arr - The array to remove empty items from | ||
* @returns The array with empty items removed | ||
*/ | ||
declare const removeEmptyItems: <T = any>(arr: (T | null | undefined)[]) => NonNullable<T>[]; | ||
export { removeEmptyItems } | ||
export { removeEmptyItems as removeEmptyItems_alias_1 } | ||
export { removeEmptyItems as removeEmptyItems_alias_2 } | ||
/** | ||
* Extract all required keys from the given type. | ||
* | ||
* @remarks This is useful when you want to create a new type that contains different type values for the required keys only or use the list of keys for validation purposes, etc... | ||
* @category Utilities | ||
*/ | ||
declare type RequiredKeysOf<BaseType extends object> = Exclude<{ | ||
[Key in keyof BaseType]: BaseType extends Record<Key, BaseType[Key]> ? Key : never; | ||
}[keyof BaseType], undefined>; | ||
export { RequiredKeysOf } | ||
export { RequiredKeysOf as RequiredKeysOf_alias_1 } | ||
declare type Rollback = Record<string, (initialValue: any, currentValue: any) => any>; | ||
export { Rollback } | ||
export { Rollback as Rollback_alias_1 } | ||
declare interface SelectOption { | ||
/** | ||
* The string value to display in the field | ||
*/ | ||
name: string; | ||
/** | ||
* The value stored behind the scenes when selected | ||
*/ | ||
value: string; | ||
/** | ||
* Is the option value valid for selection in the dropdown | ||
*/ | ||
disabled: boolean; | ||
/** | ||
* Sets or retrieves whether the option in the list box is the default item. | ||
*/ | ||
selected: boolean; | ||
} | ||
export { SelectOption } | ||
export { SelectOption as SelectOption_alias_1 } | ||
/** | ||
* Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the `SetOptional` type. | ||
* | ||
* @remarks Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required. | ||
* @category Object | ||
*/ | ||
declare type SetRequired<BaseType, Keys extends keyof BaseType> = BaseType extends unknown ? Simplify<Except<BaseType, Keys> & Required<Pick<BaseType, Keys>>> : never; | ||
export { SetRequired } | ||
export { SetRequired as SetRequired_alias_1 } | ||
declare function sha1(bytes: string | number | boolean | Uint8Array | any[]): Uint8Array; | ||
export { sha1 } | ||
export { sha1 as sha1_alias_1 } | ||
export { sha1 as sha1_alias_2 } | ||
/** | ||
* Generate a SHA-256 hash | ||
* | ||
* @remarks | ||
* This helper function is used to generate a SHA-256 hash from a string value. | ||
* | ||
* @param value - The value to hash | ||
* @returns A SHA-256 hash string | ||
*/ | ||
declare const sha256: (value: string) => void; | ||
export { sha256 } | ||
export { sha256 as sha256_alias_1 } | ||
export { sha256 as sha256_alias_2 } | ||
/** | ||
* Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability. | ||
* | ||
* @remarks Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface. | ||
* @remarks If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`. | ||
* @link https://github.com/microsoft/TypeScript/issues/15300 | ||
* @category Object | ||
*/ | ||
declare type Simplify<T> = { | ||
[KeyType in keyof T]: T[KeyType]; | ||
} & {}; | ||
export { Simplify } | ||
export { Simplify as Simplify_alias_1 } | ||
/** | ||
* Convert the input string to snake case. | ||
* | ||
* @remarks | ||
* "this_is_an_example" | ||
* | ||
* @param input - The input string. | ||
* @param options - Options to control the behavior of the function. | ||
* @returns The snake-cased string. | ||
*/ | ||
declare const snakeCase: (input?: string, options?: { | ||
splitOnNumber: boolean; | ||
}) => string | undefined; | ||
export { snakeCase } | ||
export { snakeCase as snakeCase_alias_1 } | ||
export { snakeCase as snakeCase_alias_2 } | ||
/** | ||
* Convert the input string to title case. | ||
* | ||
* @remarks | ||
* "This Is An Example" | ||
* | ||
* @param input - The input string. | ||
* @returns The title cased string. | ||
*/ | ||
declare const titleCase: (input?: string) => string | undefined; | ||
export { titleCase } | ||
export { titleCase as titleCase_alias_1 } | ||
export { titleCase as titleCase_alias_2 } | ||
declare const TYPE_ARGUMENTS = "Arguments"; | ||
export { TYPE_ARGUMENTS } | ||
export { TYPE_ARGUMENTS as TYPE_ARGUMENTS_alias_1 } | ||
declare const TYPE_ARRAY = "Array"; | ||
export { TYPE_ARRAY } | ||
export { TYPE_ARRAY as TYPE_ARRAY_alias_1 } | ||
declare const TYPE_MAP = "Map"; | ||
export { TYPE_MAP } | ||
export { TYPE_MAP as TYPE_MAP_alias_1 } | ||
declare const TYPE_OBJECT = "Object"; | ||
export { TYPE_OBJECT } | ||
export { TYPE_OBJECT as TYPE_OBJECT_alias_1 } | ||
declare const TYPE_SET = "Set"; | ||
export { TYPE_SET } | ||
export { TYPE_SET as TYPE_SET_alias_1 } | ||
declare function typeDetect(obj: unknown): string; | ||
export { typeDetect } | ||
export { typeDetect as typeDetect_alias_1 } | ||
export { typeDetect as typeDetect_alias_2 } | ||
/** | ||
* Upper case the first character of an input string. | ||
* | ||
* @remarks | ||
* "Thisisanexample" | ||
* | ||
* @param input - The input string. | ||
* @returns The capitalized string. | ||
*/ | ||
declare const upperCaseFirst: (input?: string) => string | undefined; | ||
export { upperCaseFirst } | ||
export { upperCaseFirst as upperCaseFirst_alias_1 } | ||
export { upperCaseFirst as upperCaseFirst_alias_2 } | ||
export { } | ||
export * from "./helper-fns"; |
175
package.json
{ | ||
"name": "@storm-stack/utilities", | ||
"version": "1.17.2", | ||
"private": false, | ||
"version": "1.18.0", | ||
"description": "This package includes various base utility class and various functions to assist in the development process.", | ||
@@ -11,25 +10,7 @@ "repository": { | ||
}, | ||
"private": false, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"type": "module", | ||
"publishConfig": { "access": "public" }, | ||
"dependencies": { "buffer": "^6.0.3" }, | ||
"devDependencies": { "@types/node": "^20.10.5" }, | ||
"exports": { | ||
".": { | ||
"import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }, | ||
"require": { | ||
"types": "./dist/index.d.cts", | ||
"default": "./dist/index.cjs" | ||
}, | ||
"default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" } | ||
}, | ||
"./package.json": "./package.json", | ||
"./index": { | ||
"import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }, | ||
"require": { | ||
"types": "./dist/index.d.cts", | ||
"default": "./dist/index.cjs" | ||
}, | ||
"default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" } | ||
} | ||
}, | ||
"sideEffects": false, | ||
@@ -40,20 +21,11 @@ "funding": { | ||
}, | ||
"types": "dist/index.d.ts", | ||
"typings": "dist/index.d.ts", | ||
"typescript": { "definition": "dist/index.d.ts" }, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"browser": "dist/index.global.js", | ||
"files": ["dist/**/*"], | ||
"homepage": "https://stormsoftware.org", | ||
"files": [ | ||
"dist/**/*" | ||
], | ||
"homepage": "https://stormsoftware.com", | ||
"bugs": { | ||
"url": "https://stormsoftware.org/support", | ||
"email": "support@stormsoftware.org" | ||
"url": "https://stormsoftware.com/support", | ||
"email": "support@stormsoftware.com" | ||
}, | ||
"author": { | ||
"name": "Storm Software", | ||
"email": "contact@stormsoftware.org", | ||
"url": "https://stormsoftware.org" | ||
}, | ||
"license": "Apache License 2.0", | ||
"license": "Apache-2.0", | ||
"keywords": [ | ||
@@ -68,12 +40,123 @@ "storm-stack", | ||
"acidic-model", | ||
"impact", | ||
"cyclone-ui", | ||
"nextjs", | ||
"prisma", | ||
"zenstack", | ||
"hasura", | ||
"strapi", | ||
"graphql", | ||
"sullivanpj", | ||
"monorepo" | ||
] | ||
} | ||
], | ||
"author": { | ||
"name": "Storm Software", | ||
"email": "contact@stormsoftware.com", | ||
"url": "https://stormsoftware.com" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Storm Software", | ||
"email": "contact@stormsoftware.com", | ||
"url": "https://stormsoftware.com" | ||
} | ||
], | ||
"exports": { | ||
"./types": { | ||
"import": "./dist/types.mjs", | ||
"require": "./dist/types.cjs", | ||
"types": "./dist/types.d.ts" | ||
}, | ||
"./index": { | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs", | ||
"types": "./dist/index.d.ts" | ||
}, | ||
"./helper-fns/with-timeout": { | ||
"import": "./dist/helper-fns/with-timeout.mjs", | ||
"require": "./dist/helper-fns/with-timeout.cjs", | ||
"types": "./dist/helper-fns/with-timeout.d.ts" | ||
}, | ||
"./helper-fns/union": { | ||
"import": "./dist/helper-fns/union.mjs", | ||
"require": "./dist/helper-fns/union.cjs", | ||
"types": "./dist/helper-fns/union.d.ts" | ||
}, | ||
"./helper-fns/timeout": { | ||
"import": "./dist/helper-fns/timeout.mjs", | ||
"require": "./dist/helper-fns/timeout.cjs", | ||
"types": "./dist/helper-fns/timeout.d.ts" | ||
}, | ||
"./helper-fns/throttle": { | ||
"import": "./dist/helper-fns/throttle.mjs", | ||
"require": "./dist/helper-fns/throttle.cjs", | ||
"types": "./dist/helper-fns/throttle.d.ts" | ||
}, | ||
"./helper-fns/remove-empty-items": { | ||
"import": "./dist/helper-fns/remove-empty-items.mjs", | ||
"require": "./dist/helper-fns/remove-empty-items.cjs", | ||
"types": "./dist/helper-fns/remove-empty-items.d.ts" | ||
}, | ||
"./helper-fns/noop": { | ||
"import": "./dist/helper-fns/noop.mjs", | ||
"require": "./dist/helper-fns/noop.cjs", | ||
"types": "./dist/helper-fns/noop.d.ts" | ||
}, | ||
"./helper-fns/is-runtime-server": { | ||
"import": "./dist/helper-fns/is-runtime-server.mjs", | ||
"require": "./dist/helper-fns/is-runtime-server.cjs", | ||
"types": "./dist/helper-fns/is-runtime-server.d.ts" | ||
}, | ||
"./helper-fns/is-production": { | ||
"import": "./dist/helper-fns/is-production.mjs", | ||
"require": "./dist/helper-fns/is-production.cjs", | ||
"types": "./dist/helper-fns/is-production.d.ts" | ||
}, | ||
"./helper-fns/is-deep-equal": { | ||
"import": "./dist/helper-fns/is-deep-equal.mjs", | ||
"require": "./dist/helper-fns/is-deep-equal.cjs", | ||
"types": "./dist/helper-fns/is-deep-equal.d.ts" | ||
}, | ||
"./helper-fns/index": { | ||
"import": "./dist/helper-fns/index.mjs", | ||
"require": "./dist/helper-fns/index.cjs", | ||
"types": "./dist/helper-fns/index.d.ts" | ||
}, | ||
"./helper-fns/get-unique": { | ||
"import": "./dist/helper-fns/get-unique.mjs", | ||
"require": "./dist/helper-fns/get-unique.cjs", | ||
"types": "./dist/helper-fns/get-unique.d.ts" | ||
}, | ||
"./helper-fns/get-ordered-by": { | ||
"import": "./dist/helper-fns/get-ordered-by.mjs", | ||
"require": "./dist/helper-fns/get-ordered-by.cjs", | ||
"types": "./dist/helper-fns/get-ordered-by.d.ts" | ||
}, | ||
"./helper-fns/flatten-object": { | ||
"import": "./dist/helper-fns/flatten-object.mjs", | ||
"require": "./dist/helper-fns/flatten-object.cjs", | ||
"types": "./dist/helper-fns/flatten-object.d.ts" | ||
}, | ||
"./helper-fns/delay": { | ||
"import": "./dist/helper-fns/delay.mjs", | ||
"require": "./dist/helper-fns/delay.cjs", | ||
"types": "./dist/helper-fns/delay.d.ts" | ||
}, | ||
"./helper-fns/deep-merge": { | ||
"import": "./dist/helper-fns/deep-merge.mjs", | ||
"require": "./dist/helper-fns/deep-merge.cjs", | ||
"types": "./dist/helper-fns/deep-merge.d.ts" | ||
}, | ||
"./helper-fns/deep-clone": { | ||
"import": "./dist/helper-fns/deep-clone.mjs", | ||
"require": "./dist/helper-fns/deep-clone.cjs", | ||
"types": "./dist/helper-fns/deep-clone.d.ts" | ||
}, | ||
"./helper-fns/debounce": { | ||
"import": "./dist/helper-fns/debounce.mjs", | ||
"require": "./dist/helper-fns/debounce.cjs", | ||
"types": "./dist/helper-fns/debounce.d.ts" | ||
}, | ||
"./helper-fns/arg-identity": { | ||
"import": "./dist/helper-fns/arg-identity.mjs", | ||
"require": "./dist/helper-fns/arg-identity.cjs", | ||
"types": "./dist/helper-fns/arg-identity.d.ts" | ||
} | ||
} | ||
} |
196
README.md
@@ -6,24 +6,61 @@ <!-- START header --> | ||
<div align="center"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/storm-banner.gif" width="100%" altText="Storm Software" /></div> | ||
<div align="center"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/storm-banner.gif" width="100%" alt="Storm Software" /></div> | ||
<br /> | ||
<br /> | ||
<div align="center"> | ||
<a href="https://stormsoftware.org" target="_blank">Website</a> | <a href="https://stormsoftware.org/contact" target="_blank">Contact</a> | <a href="https://github.com/storm-software/storm-stack" target="_blank">Repository</a> | <a href="https://storm-software.github.io/storm-stack/" target="_blank">Documentation</a> | <a href="https://github.com/storm-software/storm-stack/issues/new?assignees=&labels=bug&template=bug-report.yml&title=Bug Report%3A+">Report a Bug</a> | <a href="https://github.com/storm-software/storm-stack/issues/new?assignees=&labels=enhancement&template=feature-request.yml&title=Feature Request%3A+">Request a Feature</a> | <a href="https://github.com/storm-software/storm-stack/discussions">Ask a Question</a> | ||
<b> | ||
<a href="https://stormsoftware.com" target="_blank">Website</a> • | ||
<a href="https://github.com/storm-software/storm-stack" target="_blank">GitHub</a> • | ||
<a href="https://discord.gg/MQ6YVzakM5">Discord</a> • <a href="https://stormstack.github.io/stormstack/" target="_blank">Docs</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> • | ||
<a href="https://github.com/storm-software/storm-stack/issues/new?assignees=&labels=bug&template=bug-report.yml&title=Bug Report%3A+">Report a Bug</a> | ||
</b> | ||
</div> | ||
<br /> | ||
This package is part of the <b>⚡storm-stack</b> monorepo. The storm-stack packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications. | ||
This package is part of the ⚡<b>Storm Stack</b> monorepo. Storm Stack packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications. | ||
<br /> | ||
<h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br /> | ||
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br /> | ||
[![Version](https://img.shields.io/badge/version-1.16.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/) | ||
[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6) | ||
[![Version](https://img.shields.io/badge/version-1.18.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/) [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-stack/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6) | ||
> [!IMPORTANT] | ||
<!-- prettier-ignore-start --> | ||
<!-- markdownlint-disable --> | ||
> [!IMPORTANT] | ||
> This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across. | ||
<!-- markdownlint-restore --> | ||
<!-- prettier-ignore-end --> | ||
<div align="center"> | ||
<b>Be sure to ⭐ this repository on <a href="https://github.com/storm-software/storm-stack" target="_blank">GitHub</a> so you can keep up to date on any daily progress!</b> | ||
</div> | ||
<br /> | ||
<!-- START doctoc --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
## Table of Contents | ||
- [Storm Utilities Package](#storm-utilities-package) | ||
- [Table of Contents](#table-of-contents) | ||
- [Installing](#installing) | ||
- [Reduced Package Size](#reduced-package-size) | ||
- [Development](#development) | ||
- [Building](#building) | ||
- [Running unit tests](#running-unit-tests) | ||
- [Linting](#linting) | ||
- [Storm Workspaces](#storm-workspaces) | ||
- [Roadmap](#roadmap) | ||
- [Support](#support) | ||
- [License](#license) | ||
- [Changelog](#changelog) | ||
- [Contributing](#contributing) | ||
- [Contributors](#contributors) | ||
<!-- END doctoc --> | ||
<br /> | ||
<!-- markdownlint-restore --> | ||
@@ -36,5 +73,26 @@ <!-- prettier-ignore-end --> | ||
This package contains various utilities functions that serve a wide range of purposes. These utilities are used by other packages in the storm-stack monorepo and any other projects that could benefit from their functionality. | ||
This package contains various utilities functions that serve a wide range of | ||
purposes. These utilities are used by other packages in the storm-stack monorepo | ||
and any other projects that could benefit from their functionality. | ||
<!-- START doctoc --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
## Table of Contents | ||
- [Installing](#installing) | ||
- [Reduced Package Size](#reduced-package-size) | ||
- [Development](#development) | ||
- [Building](#building) | ||
- [Running unit tests](#running-unit-tests) | ||
- [Linting](#linting) | ||
- [Storm Workspaces](#storm-workspaces) | ||
- [Roadmap](#roadmap) | ||
- [Support](#support) | ||
- [License](#license) | ||
- [Changelog](#changelog) | ||
- [Contributing](#contributing) | ||
- [Contributors](#contributors) | ||
- [💻 Visit stormsoftware.org to stay up to date with this developer](#-visit-stormsoftwareorg-to-stay-up-to-date-with-this-developer) | ||
<!-- END doctoc --> | ||
@@ -70,7 +128,11 @@ | ||
This project uses [tsup](https://tsup.egoist.dev/) to package the source code due to its ability to remove unused code and ship smaller javascript files thanks to code splitting. This helps to greatly reduce the size of the package and to make it easier to use in other projects. | ||
This project uses [tsup](https://tsup.egoist.dev/) to package the source code | ||
due to its ability to remove unused code and ship smaller javascript files | ||
thanks to code splitting. This helps to greatly reduce the size of the package | ||
and to make it easier to use in other projects. | ||
## Development | ||
This project is built using [Nx](https://nx.dev). As a result, many of the usual commands are available to assist in development. | ||
This project is built using [Nx](https://nx.dev). As a result, many of the usual | ||
commands are available to assist in development. | ||
@@ -96,12 +158,26 @@ ### Building | ||
Storm workspaces are built using <a href="https://nx.dev/" target="_blank">Nx</a>, a set of extensible dev tools for monorepos, which helps you develop like Google, Facebook, and Microsoft. Building on top of Nx, the Open System provides a set of tools and patterns that help you scale your monorepo to many teams while keeping the codebase maintainable. | ||
Storm workspaces are built using | ||
<a href="https://nx.dev/" target="_blank">Nx</a>, a set of extensible dev tools | ||
for monorepos, which helps you develop like Google, Facebook, and Microsoft. | ||
Building on top of Nx, the Open System provides a set of tools and patterns that | ||
help you scale your monorepo to many teams while keeping the codebase | ||
maintainable. | ||
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div> | ||
<br /> | ||
## Roadmap | ||
See the [open issues](https://github.com/storm-software/storm-stack/issues) for a list of proposed features (and known issues). | ||
See the [open issues](https://github.com/storm-software/storm-stack/issues) for a | ||
list of proposed features (and known issues). | ||
- [Top Feature Requests](https://github.com/storm-software/storm-stack/issues?q=label%3Aenhancement+is%3Aopen+sort%3Areactions-%2B1-desc) (Add your votes using the 👍 reaction) | ||
- [Top Bugs](https://github.com/storm-software/storm-stack/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Areactions-%2B1-desc) (Add your votes using the 👍 reaction) | ||
- [Top Feature Requests](https://github.com/storm-software/storm-stack/issues?q=label%3Aenhancement+is%3Aopen+sort%3Areactions-%2B1-desc) | ||
(Add your votes using the 👍 reaction) | ||
- [Top Bugs](https://github.com/storm-software/storm-stack/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Areactions-%2B1-desc) | ||
(Add your votes using the 👍 reaction) | ||
- [Newest Bugs](https://github.com/storm-software/storm-stack/issues?q=is%3Aopen+is%3Aissue+label%3Abug) | ||
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div> | ||
<br /> | ||
## Support | ||
@@ -111,19 +187,35 @@ | ||
- [Contact](https://stormsoftware.org/contact) | ||
- [Contact](https://stormsoftware.com/contact) | ||
- [GitHub discussions](https://github.com/storm-software/storm-stack/discussions) | ||
- <support@stormsoftware.org> | ||
- <support@stormsoftware.com> | ||
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div> | ||
<br /> | ||
## License | ||
This project is licensed under the **Apache License 2.0**. Feel free to edit and distribute this template as you like. | ||
This project is licensed under the **Apache License 2.0**. Feel free to edit and | ||
distribute this template as you like. | ||
See [LICENSE](LICENSE) for more information. | ||
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div> | ||
<br /> | ||
## Changelog | ||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Every release, along with the migration instructions, is documented in the [CHANGELOG](CHANGELOG.md) file | ||
This project adheres to | ||
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). Every release, along | ||
with the migration instructions, is documented in the [CHANGELOG](CHANGELOG.md) | ||
file | ||
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div> | ||
<br /> | ||
## Contributing | ||
First off, thanks for taking the time to contribute! Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are **greatly appreciated**. | ||
First off, thanks for taking the time to contribute! Contributions are what | ||
makes the open-source community such an amazing place to learn, inspire, and | ||
create. Any contributions you make will benefit everybody else and are **greatly | ||
appreciated**. | ||
@@ -133,3 +225,4 @@ Please try to create bug reports that are: | ||
- _Reproducible._ Include steps to reproduce the problem. | ||
- _Specific._ Include as much detail as possible: which version, what environment, etc. | ||
- _Specific._ Include as much detail as possible: which version, what | ||
environment, etc. | ||
- _Unique._ Do not duplicate existing opened issues. | ||
@@ -140,7 +233,13 @@ - _Scoped to a Single Bug._ One bug per report. | ||
You can use [markdownlint-cli](https://github.com/storm-software/storm-stack/markdownlint-cli) to check for common markdown style inconsistency. | ||
You can use | ||
[markdownlint-cli](https://github.com/storm-software/storm-stack/markdownlint-cli) | ||
to check for common markdown style inconsistency. | ||
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div> | ||
<br /> | ||
## Contributors | ||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): | ||
Thanks goes to these wonderful people | ||
([emoji key](https://allcontributors.org/docs/en/emoji-key)): | ||
@@ -152,5 +251,5 @@ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | ||
<tr> | ||
<td align="center" valign="top" width="14.28%"><a href="http://www.sullypat.com/"><img src="https://avatars.githubusercontent.com/u/99053093?v=4?s=100" width="100px;" alt="Patrick Sullivan"/><br /><sub><b>Patrick Sullivan</b></sub></a><br /><a href="#design-sullivanpj" title="Design">🎨</a> <a href="https://github.com/storm-software/storm-ops/commits?author=sullivanpj" title="Code">💻</a> <a href="#tool-sullivanpj" title="Tools">🔧</a> <a href="https://github.com/storm-software/storm-ops/commits?author=sullivanpj" title="Documentation">📖</a> <a href="https://github.com/storm-software/storm-ops/commits?author=sullivanpj" title="Tests">⚠️</a></td> | ||
<td align="center" valign="top" width="14.28%"><a href="http://www.sullypat.com/"><img src="https://avatars.githubusercontent.com/u/99053093?v=4?s=100" width="100px;" alt="Patrick Sullivan"/><br /><sub><b>Patrick Sullivan</b></sub></a><br /><a href="#design-sullivanpj" title="Design">🎨</a> <a href="https://github.com/storm-software/storm-stack/commits?author=sullivanpj" title="Code">💻</a> <a href="#tool-sullivanpj" title="Tools">🔧</a> <a href="https://github.com/storm-software/storm-stack/commits?author=sullivanpj" title="Documentation">📖</a> <a href="https://github.com/storm-software/storm-stack/commits?author=sullivanpj" title="Tests">⚠️</a></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://tylerbenning.com/"><img src="https://avatars.githubusercontent.com/u/7265547?v=4?s=100" width="100px;" alt="Tyler Benning"/><br /><sub><b>Tyler Benning</b></sub></a><br /><a href="#design-tbenning" title="Design">🎨</a></td> | ||
<td align="center" valign="top" width="14.28%"><a href="http://stormsoftware.org"><img src="https://avatars.githubusercontent.com/u/149802440?v=4?s=100" width="100px;" alt="Stormie"/><br /><sub><b>Stormie</b></sub></a><br /><a href="#maintenance-stormie-bot" title="Maintenance">🚧</a></td> | ||
<td align="center" valign="top" width="14.28%"><a href="http://stormsoftware.com"><img src="https://avatars.githubusercontent.com/u/149802440?v=4?s=100" width="100px;" alt="Stormie"/><br /><sub><b>Stormie</b></sub></a><br /><a href="#maintenance-stormie-bot" title="Maintenance">🚧</a></td> | ||
</tr> | ||
@@ -161,3 +260,3 @@ </tbody> | ||
<td align="center" size="13px" colspan="7"> | ||
<img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg"> | ||
<img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg" alt="All Contributors"> | ||
<a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a> | ||
@@ -172,24 +271,55 @@ </img> | ||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! | ||
This project follows the | ||
[all-contributors](https://github.com/all-contributors/all-contributors) | ||
specification. Contributions of any kind welcome! | ||
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div> | ||
<br /> | ||
<hr /> | ||
<br /> | ||
<div align="center"> | ||
<img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/logo-banner.png" width="100%" altText="Storm Software" /> | ||
<img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/logo-banner.png" width="100%" alt="Storm Software" /> | ||
</div> | ||
<br /> | ||
<div align="center"> | ||
<a href="https://stormsoftware.org" target="_blank">Website</a> | <a href="https://stormsoftware.org/contact" target="_blank">Contact</a> | <a href="https://linkedin.com/in/patrick-sullivan-865526b0" target="_blank">LinkedIn</a> | <a href="https://medium.com/@pat.joseph.sullivan" target="_blank">Medium</a> | <a href="https://github.com/storm-software" target="_blank">GitHub</a> | <a href="https://keybase.io/sullivanp" target="_blank">OpenPGP Key</a> | ||
<a href="https://stormsoftware.com" target="_blank">Website</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> • <a href="https://linkedin.com/in/patrick-sullivan-865526b0" target="_blank">LinkedIn</a> • <a href="https://medium.com/@pat.joseph.sullivan" target="_blank">Medium</a> • <a href="https://github.com/storm-software" target="_blank">GitHub</a> • <a href="https://keybase.io/sullivanp" target="_blank">OpenPGP Key</a> | ||
</div> | ||
<div align="center"> | ||
<p><b>Fingerprint:</b> 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D</p> | ||
<b>Fingerprint:</b> 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D | ||
</div> | ||
<br /> | ||
Storm Software is an open source software development organization and creator of Acidic, StormStack and StormCloud. Our mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languagues. | ||
Storm Software is an open source software development organization and creator | ||
of Acidic, StormStack and StormCloud. | ||
If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our website! | ||
Our mission is to make software development more accessible. Our ideal future is | ||
one where anyone can create software without years of prior development | ||
experience serving as a barrier to entry. We hope to achieve this via LLMs, | ||
Generative AI, and intuitive, high-level data modeling/programming languages. | ||
<h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br /><br /> | ||
Join us on [Discord](https://discord.gg/MQ6YVzakM5) to chat with the team, | ||
receive release notifications, ask questions, and get involved. | ||
If this sounds interesting, and you would like to help us in creating the next | ||
generation of development tools, please reach out on our | ||
[website](https://stormsoftware.com/contact) or join our | ||
[Slack channel](https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA)! | ||
<br /> | ||
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/icon-fill.png" alt="Storm Software" width="200px"/></a></div> | ||
<br /> | ||
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/visit-us-text.svg" alt="Visit us at stormsoftware.com" height="90px"/></a></div> | ||
<br /> | ||
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div> | ||
<br /> | ||
<br /> | ||
<!-- markdownlint-restore --> | ||
@@ -196,0 +326,0 @@ <!-- prettier-ignore-end --> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
0
63
1473
0
0
319
0
76631
1
- Removedbuffer@^6.0.3
- Removedbase64-js@1.5.1(transitive)
- Removedbuffer@6.0.3(transitive)
- Removedieee754@1.2.1(transitive)