@kevinkosterr/vue3-form-generator
Version:
A schema-based form generator component for Vue 3, based on the original [`vue-form-generator`](https://github.com/vue-generators/vue-form-generator) library.
37 lines (36 loc) • 1.12 kB
TypeScript
import { Field } from '../resources/types/field/fields';
/**
* Determine if value is of type Function.
*/
export declare function isFunction(val: any): boolean;
/**
* Determine if a value is of type Object.
*/
export declare function isObject(val: any): boolean;
/**
* Determine if a value is of type String.
*/
export declare function isString(val: any): boolean;
/**
* Remove duplicates from an array.
*/
export declare function toUniqueArray(arr: any[]): any[];
/**
* Determine the field component name based on the field schema.
*/
export declare function getFieldComponentName(field: Field): string;
/**
* Determine if a value is empty.
*/
export declare function isEmpty(value: any): boolean;
/**
* Determine whether a value is not empty.
* @param {any} value
* @returns {boolean}
*/
export declare function isNotEmpty(value: any): boolean;
/**
* Reset all properties to an empty value of the same type. Will recursively try and
* reset all properties if an object has a property with another object as its value.
*/
export declare function resetObjectProperties(obj: Record<string, any>): object;