This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type RecursiveKeyOf< | |
TObj, | |
TPrefix extends string = '' | |
> = TObj extends Record<string, any> | |
? { | |
[K in keyof TObj & string]: | |
| `${TPrefix}${K}` | |
| RecursiveKeyOf<TObj[K], `${TPrefix}${K}.`>; | |
}[keyof TObj & string] | |
: never; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createSpan = (text) => { | |
const node = document.createElement("span"); | |
node.textContent = text; | |
return node; | |
}; | |
const insertBetweenElementWhitespace = (elements) => | |
elements.reduce((acc, span) => acc.concat(span, " "), []).slice(0, -1); | |
const spanifyText = text => { |
NewerOlder