ObjectX<T> extension

An extension that adds utilities for safely casting objects

on
  • T?

Methods

guard<R>(R cb(T value)) → R?
Transform an object if that value is not null.
safeCast<R>() → R?
Safely cast an object, returning null if the casted object does not match the casted type.