Skip to content

Home > @opennd/lib > setIfNotUndef

setIfNotUndef() function

当值不为undefined时,将值赋值给data[key]

Signature:

typescript
export declare function setIfNotUndef(data: {}, key: string, value: any): void;

Parameters

Parameter

Type

Description

data

{}

key

string

value

any

**Returns:**

void