UNPKG

object-fill-missing-keys

Version:

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

17 lines (14 loc) 385 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 { type Opts, defaults, fillMissing, version };