Typesafe

Typesafe

Source:

Checks whether a value is defined. This func­tion con­siders all val­ues that are not null and not un­defined to be defined.

Typesafe

Source:

De­term­ine type of an ob­ject. Like obj.con­structor, but won't fail for null/​un­defined and just re­turns the value it­self for those. This is a use­ful fea­ture for code that is sup­posed to be null/​un­defined-safe since those need not be spe­cial cased.

Typesafe

Source:

Given a type, de­term­ine it's name. This is use­ful as a re­place­ment for val.con­structor.name, since this can deal with null and un­defined.