A utility for version transformation of data.
SETUP
You should have transforms
folder with file *.js
that represents transform for your entity
Example of transforms file you can find here
Configure transform
// entity.jsmoduleexports = v2: V1toV2: { return data; } // optional { mongo; }
or if you send in the options
argument:
// entity.jsmoduleexports = v2: V1toV2: { return data; } // optional { mongo; }
Transform for single object
The options
argument is optional and allows you to send any additional data in to the transformation that you might need.
transformsentity
Transform for list with streams
The options
argument is optional.
var transformStream = transformsentity;;