@formkit/utils
Advanced tools
Comparing version 1.0.0-beta.7-97faaf8 to 1.0.0-beta.7-a08b39d
@@ -120,12 +120,12 @@ /** | ||
export declare function init<T extends object>(obj: T): T & { | ||
__init: true; | ||
__init?: true; | ||
}; | ||
/** | ||
* Determines if an object is an object or not. | ||
* @param o - any value | ||
* Checks if an object is a simple array or record. | ||
* @param o - A value to check | ||
* @returns | ||
* @public | ||
*/ | ||
export declare function isObject(o: any): boolean; | ||
export declare function isObject(o: unknown): o is Record<PropertyKey, unknown> | unknown[]; | ||
@@ -140,3 +140,3 @@ /** | ||
*/ | ||
export declare function isPojo(o: any): boolean; | ||
export declare function isPojo(o: any): o is Record<string, any>; | ||
@@ -159,2 +159,10 @@ /** | ||
/** | ||
* Determines if an object is an object or not. | ||
* @param o - any value | ||
* @returns | ||
* @public | ||
*/ | ||
export declare function isRecord(o: unknown): o is Record<PropertyKey, unknown>; | ||
/** | ||
* This converts camel-case to kebab case. It ONLY converts from camel to kebab. | ||
@@ -225,2 +233,10 @@ * @param str - Converts camel to kebab | ||
/** | ||
* Very shallowly clones the given object. | ||
* @param obj - The object to shallow clone | ||
* @returns | ||
* @public | ||
*/ | ||
export declare function shallowClone<T>(obj: T, explicit?: string[]): T; | ||
/** | ||
* Turn any string into a URL/DOM safe string. | ||
@@ -232,2 +248,9 @@ * @public | ||
/** | ||
* Spreads an object or an array, otherwise returns the same value. | ||
* @param obj - Any value, but will spread objects and arrays | ||
* @public | ||
*/ | ||
export declare function spread<T>(obj: T, explicit?: string[]): T; | ||
/** | ||
* Generates a random string. | ||
@@ -234,0 +257,0 @@ * @returns string |
{ | ||
"name": "@formkit/utils", | ||
"version": "1.0.0-beta.7-97faaf8", | ||
"version": "1.0.0-beta.7-a08b39d", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Shared utilities for FormKit packages", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
45326
1488
57776
39