@augment-vir/common
Advanced tools
Comparing version 4.2.1 to 4.3.0
import { AtLeastTuple } from './tuple'; | ||
import { ArrayElement } from './type'; | ||
export declare function filterOutIndexes<T>(array: Readonly<T[]>, indexes: Readonly<number[]>): T[]; | ||
export declare function flatten2dArray<T>(array2d: T[][]): T[]; | ||
export declare function filterOutIndexes<T>(array: ReadonlyArray<T>, indexes: ReadonlyArray<number>): T[]; | ||
export declare function flatten2dArray<T>(array2d: ReadonlyArray<ReadonlyArray<T>>): T[]; | ||
export declare type AtLeastOneEntryArray<ArrayGeneric extends ReadonlyArray<any>> = AtLeastTuple<ArrayElement<ArrayGeneric>, 1>; | ||
export declare function trimArrayStrings(input: string[]): string[]; | ||
export declare function trimArrayStrings(input: ReadonlyArray<string>): string[]; | ||
/** | ||
@@ -14,3 +14,3 @@ * Acts like calling Array.prototype.forEach in that all elements are executed upon in order, and | ||
export declare function awaitedBlockingMap<OriginalGeneric, MappedGeneric>(input: ReadonlyArray<OriginalGeneric>, callback: (arrayElement: OriginalGeneric, index: number, wholeArray: ReadonlyArray<OriginalGeneric>) => MappedGeneric | PromiseLike<MappedGeneric>): Promise<Awaited<MappedGeneric>[]>; | ||
export declare function isInTypedArray<T>(array: T[], input: any): input is T; | ||
export declare function isInTypedArray<T>(array: ReadonlyArray<T>, input: any): input is T; | ||
declare type MapCallbackType<ArrayType extends ReadonlyArray<any>, OutputType> = (value: ArrayElement<ArrayType>, index: number, array: ArrayType) => OutputType; | ||
@@ -17,0 +17,0 @@ /** Preserves tuple types. */ |
@@ -1,2 +0,2 @@ | ||
export declare const englishFullMonthNames: string[]; | ||
export declare const englishFullMonthNames: readonly ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"]; | ||
export declare const englishShortMonthNames: string[]; | ||
@@ -3,0 +3,0 @@ export declare class InvalidDateError extends Error { |
import { AtLeastTuple } from './tuple'; | ||
export declare function combineErrors(errors: AtLeastTuple<Error, 1>): Error; | ||
export declare function combineErrors(errors: never[]): undefined; | ||
export declare function combineErrors(errors: Error[]): Error | undefined; | ||
export declare function combineErrors(errors: ReadonlyArray<never>): undefined; | ||
export declare function combineErrors(errors: ReadonlyArray<Error>): Error | undefined; | ||
export declare function combineErrors(errors?: undefined): undefined; | ||
export declare function combineErrorMessages(errors?: (Error | string | undefined)[] | undefined): string; | ||
export declare function combineErrorMessages(errors?: ReadonlyArray<Error | string | undefined> | undefined): string; | ||
export declare function extractErrorMessage(error: unknown): string; | ||
export declare function ensureError(input: unknown): Error; |
@@ -27,2 +27,2 @@ export declare function clamp( | ||
*/ | ||
export declare function truncateNumber(originalValue: unknown, suffixes?: readonly string[]): string; | ||
export declare function truncateNumber(originalValue: unknown, suffixes?: ReadonlyArray<string>): string; |
@@ -7,3 +7,3 @@ import { AtLeastOneEntryArray } from './array'; | ||
export declare function isKeyof<ObjectGeneric>(key: PropertyKey, object: ObjectGeneric): key is keyof object; | ||
export declare function filterToEnumValues<T extends object>(inputs: unknown[], checkEnum: T, caseInsensitive?: boolean): T[keyof T][]; | ||
export declare function filterToEnumValues<T extends object>(inputs: ReadonlyArray<unknown>, checkEnum: T, caseInsensitive?: boolean): T[keyof T][]; | ||
export declare function getObjectTypedKeys<ObjectGeneric extends unknown>(input: ObjectGeneric): ReadonlyArray<keyof ObjectGeneric>; | ||
@@ -15,3 +15,3 @@ export declare function getObjectTypedValues<ObjectGeneric extends unknown>(input: ObjectGeneric): ObjectGeneric[keyof ObjectGeneric][]; | ||
export declare function typedHasProperty<KeyGeneric extends PropertyKey, ParentGeneric>(inputObject: ParentGeneric, inputKey: KeyGeneric): inputObject is CombineTypeWithKey<KeyGeneric, ParentGeneric>; | ||
export declare function typedHasProperties<KeyGeneric extends PropertyKey, ParentGeneric>(inputObject: ParentGeneric, inputKeys: KeyGeneric[]): inputObject is CombineTypeWithKey<KeyGeneric, ParentGeneric>; | ||
export declare function typedHasProperties<KeyGeneric extends PropertyKey, ParentGeneric>(inputObject: ParentGeneric, inputKeys: ReadonlyArray<KeyGeneric>): inputObject is CombineTypeWithKey<KeyGeneric, ParentGeneric>; | ||
export declare function isObject(input: any): input is NonNullable<object>; | ||
@@ -18,0 +18,0 @@ export declare function getEntriesSortedByKey(input: object): [string, unknown][]; |
@@ -10,3 +10,3 @@ /** | ||
*/ | ||
export declare function joinWithFinalConjunction<T>(list: T[], conjunction?: string): string; | ||
export declare function joinWithFinalConjunction(list: ReadonlyArray<any>, conjunction?: string): string; | ||
export declare function removeAnsiEscapeCodes(input: string): string; | ||
@@ -18,3 +18,3 @@ export declare const removeColor: typeof removeAnsiEscapeCodes; | ||
/** Same as String.prototype.split but includes the delimiter to split by in the output array. */ | ||
export declare function splitIncludeSplit(original: string, splitterInput: string | RegExp, caseSensitive: boolean): string[]; | ||
export declare function splitIncludeSplit(original: string, splitterInput: string | RegExp, caseSensitive: boolean): readonly string[]; | ||
export declare type CasingOptions = { | ||
@@ -21,0 +21,0 @@ capitalizeFirstLetter: boolean; |
@@ -13,2 +13,3 @@ export * from './augments/ansi'; | ||
export * from './augments/type'; | ||
export * from './augments/type-of'; | ||
export * from './augments/type-test'; |
@@ -29,2 +29,3 @@ "use strict"; | ||
__exportStar(require("./augments/type"), exports); | ||
__exportStar(require("./augments/type-of"), exports); | ||
__exportStar(require("./augments/type-test"), exports); |
{ | ||
"name": "@augment-vir/common", | ||
"version": "4.2.1", | ||
"version": "4.3.0", | ||
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common", | ||
@@ -25,3 +25,4 @@ "bugs": { | ||
"dependencies": { | ||
"@type-challenges/utils": "^0.1.1" | ||
"@type-challenges/utils": "^0.1.1", | ||
"type-fest": "^3.2.0" | ||
}, | ||
@@ -28,0 +29,0 @@ "devDependencies": { |
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
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
59845
32
1247
2
+ Addedtype-fest@^3.2.0
+ Addedtype-fest@3.13.1(transitive)