ObjectType

flitter-orm/src/schema/types/Object~ ObjectType

Schema type representing a 2-way serializable object comprised of keys of other schema types.


Constructor

new ObjectType()

Extends

Methods

(static) cast(value) → {object}

Casts the specified value to an object. This walks the object through serialization and de-serialization for 2 reasons. First, it ensures a clone of the object. Second, it strips any non-serializable structures from the object.

Parameters:
Name Type Description
value
Returns:
Type
object

(static) validate(value) → {boolean}

Determines whether the specified value is a serializable object.

Parameters:
Name Type Description
value *
Returns:
Type
boolean