jenesius-vue-form
Version:
Heavy form system for Vue.js
26 lines (25 loc) • 637 B
TypeScript
/**
* @description Функция проходит по всем конечным элементам объекта.
* @return Array of {path: string[], value: any}
* @example
* { person: { profile: { head: { mouth: 1, eyes: 2 } } } }
* Result:
* [
* {
* path: ['person', 'profile', 'head', 'mouth'],
* value: 1
* },
* {
* path: ['person', 'profile', 'head', 'eyes'],
* value: 2
* }
* ]
*/
export default function bypassObject(object: any): BypassItem[];
interface BypassItem {
value: any;
path: string[];
name: string;
set: (x: any) => void;
}
export {};