Skip to content

Commit

Permalink
Merge pull request #26 from alizeait/update-types
Browse files Browse the repository at this point in the history
Update types
  • Loading branch information
alizeait committed Jan 31, 2023
2 parents e61c0e6 + af36c06 commit eb55d04
Show file tree
Hide file tree
Showing 2 changed files with 6,190 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ function arrayOrObj(key: string | number): [] | Record<string, any> {
const char = (key + "").charCodeAt(0);
return char < 48 || char > 57 ? {} : [];
}
export function unflatto(
input: Record<string, any>,
export function unflatto<Input extends Record<string, any>, Output = unknown>(
input: Input,
seperator?: string
): unknown {
): Output {
let i = 0,
ancestor: any,
chunk: string,
Expand Down
Loading

0 comments on commit eb55d04

Please sign in to comment.