@harlem/utilities
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -19,3 +19,19 @@ import { UnwrapRef } from 'vue'; | ||
} | ||
type RuntimeType = 'boolean' | 'number' | 'string' | 'error' | 'date' | 'regexp' | 'function' | 'symbol' | 'array' | 'object' | 'map' | 'set' | 'null' | 'undefined'; | ||
type RuntimeType = keyof RuntimeTypeMap; | ||
interface RuntimeTypeMap { | ||
boolean: boolean; | ||
number: number; | ||
string: string; | ||
error: Error; | ||
date: Date; | ||
regexp: RegExp; | ||
function: Function; | ||
symbol: symbol; | ||
array: Array<unknown>; | ||
object: object; | ||
map: Map<unknown, unknown>; | ||
set: Set<unknown>; | ||
null: null; | ||
undefined: undefined; | ||
} | ||
@@ -26,3 +42,3 @@ declare function normalise(matcher: Matcher): Predicate<string>; | ||
declare function clamp(lower: number, upper: number, value: number): number; | ||
declare function clamp(value: number, lower: number, upper: number): number; | ||
@@ -51,2 +67,4 @@ declare function clone<TValue = unknown>(value: TValue): UnwrapRef<TValue>; | ||
declare function typeIsAny<TType extends RuntimeType>(value: unknown, types: TType[]): value is RuntimeTypeMap[TType]; | ||
declare function isArray(value: unknown): value is unknown[]; | ||
@@ -66,2 +84,2 @@ | ||
export { Constructable, Disposable, Matchable, Matcher, OneOrMore, Predicate, RuntimeType, UnionToIntersection, identity as functionIdentity, getFilter as matchGetFilter, normalise as matchNormalise, clamp as numberClamp, clone as objectClone, fromPath as objectFromPath, lock as objectLock, omit as objectOmit, overwrite as objectOverwrite, setObjectValue as objectSet, toPath as objectToPath, traceObject as objectTrace, getType as typeGetType, isArray as typeIsArray, isBoolean as typeIsBoolean, isFunction as typeIsFunction, isMatchable as typeIsMatchable, isNil as typeIsNil, isObject as typeIsObject, isString as typeIsString }; | ||
export { Constructable, Disposable, Matchable, Matcher, OneOrMore, Predicate, RuntimeType, RuntimeTypeMap, UnionToIntersection, identity as functionIdentity, getFilter as matchGetFilter, normalise as matchNormalise, clamp as numberClamp, clone as objectClone, fromPath as objectFromPath, lock as objectLock, omit as objectOmit, overwrite as objectOverwrite, setObjectValue as objectSet, toPath as objectToPath, traceObject as objectTrace, getType as typeGetType, typeIsAny, isArray as typeIsArray, isBoolean as typeIsBoolean, isFunction as typeIsFunction, isMatchable as typeIsMatchable, isNil as typeIsNil, isObject as typeIsObject, isString as typeIsString }; |
{ | ||
"name": "@harlem/utilities", | ||
"amdName": "harlemUtilities", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"license": "MIT", | ||
@@ -52,3 +52,3 @@ "author": "Andrew Courtice <andrewcourtice@users.noreply.github.com>", | ||
}, | ||
"gitHead": "c75d52990da6e0ba65fe74d482e0b3be3c199cdb" | ||
"gitHead": "3974f0c66f926429b0201a7df367c7a5b886a1a4" | ||
} |
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
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
785099
16924