Converter source

An abstract type for converters, objects that can convert and optionally revert values between domains, like strings and numbers.

Converts and optionally reverts values between two domains. The converter interface consists of two methods:

  • convert(input): convert input to output
  • revert(output): optional, converts output back to input

Properties

allowPartialConversion :boolean source

Specifies whether the converter allows partial conversion.

Default Value:
  • true

Methods

convert() source

Converts values from the input domain into the output range.

Default Value:
  • null

revert() source

Optionally, reverts values from the output range, back into the input range. This may not be possible with high fidelity depending on the relationship between these domains.

Default Value:
  • null

Generated from a4679af

comments powered by Disqus

More help?

Can't find what you are looking for? Get in touch, we're more than happy in helping answer your questions.