UNPKG

object-fill-missing-keys

Version:

Add missing keys into plain objects, according to a reference object

18 lines (15 loc) 396 B
import { Obj } from "codsen-utils"; declare const version: string; interface Opts { placeholder: boolean; doNotFillThesePathsIfTheyContainPlaceholders: string[]; useNullAsExplicitFalse: boolean; } declare const defaults: Opts; declare function fillMissing( incomplete: Obj, schema: Obj, opts?: Partial<Opts>, ): Obj; export { defaults, fillMissing, version }; export type { Opts };