Skip to content

Commit

Permalink
feat: add parseTree type check
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed Aug 4, 2022
1 parent fe43cf3 commit 669c8b1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ export const parseTree = (key, value, level = 0) => {
children: data ? Object.keys(data).map((it) => parseTree(it, data[it], level + 1)) : [],
};
}
// * value is string & number & null
return {
name: key,
value,
value: value == null ? '' : value.toString(),
description: '',
type: whatType(value),
required: true,
Expand Down

0 comments on commit 669c8b1

Please sign in to comment.