Skip to content

[utilities]: add basic ts guards like isString, isNumber, ... #53

@michaelwittwer

Description

@michaelwittwer

Adds typescript guards for some basic type checks like:

  • isString
  • isNumber
  • isBoolean
  • isDefined
  • ...

This helps for readable code like:

if(isDefined(weight) && isDefined(height)){
  const total = weight * height
}

or

informations
  .filter(isDefined)
  .map(i => i['note'])

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions