ConvertField

Interface to convert basic type T to field type U and vice versa.

Instance Members

basicToField(instance: Entity, field: String, assets: Assets, basic: ceramic.ConvertField.T, done: Function): Void

Get field value from basic type. As this may require loading assets, A usable Assets instance must be provided and the result will only be provided asynchronously by calling done callback.

Name Type
instance Entity
field String
assets Assets
basic ceramic.ConvertField.T
done Function

fieldToBasic(instance: Entity, field: String, value: ceramic.ConvertField.U): ceramic.ConvertField.T

Get a basic type from the field value.

Name Type
instance Entity
field String
value ceramic.ConvertField.U
Returns
ceramic.ConvertField.T