Transformations are indicated by pipes (|) followed by a function name. Functions can be added to LocusZoom.KnowTransformations which is an object that maps strings to functions.
As I started to add in the test I realized a bit more refactoring would be needed. I've decided to add the testing as a separate PR. This PR is ready for review and merging.
This update allows transformations to be applied to fields returned from the API.
For example, on the demo page if you run
You can then either call
or
Transformations are indicated by pipes (
|
) followed by a function name. Functions can be added toLocusZoom.KnowTransformations
which is an object that maps strings to functions.