elasticio / component-commons-library

Storage for most common component development cases
Apache License 2.0
0 stars 0 forks source link

Add JSONataTransform #6

Closed dvd-z closed 5 years ago

dvd-z commented 5 years ago

I'm working on this issue: https://github.com/elasticio/splitter-component/issues/18. Since the issue needs a duplication of JSONata transform functionality, Jacob told me to add JSONata transform to the commons library.

The code and tests are copied from https://github.com/elasticio/jsonata-transform-component, with slight modifications, e.g. removing

for (const item of result) {
    await this.emit('data', eioUtils.newMessageWithBody(item));
}

from line 26 of processAction in transform.js.

dvd-z commented 5 years ago

Going to add functionality from https://github.com/elasticio/jsonata-transform-component/pull/13 later, don't merge for now