How to integrate an already made payload parser for TTN in TagoIO?

How to integrate an already made payload parser for TTN in TagoIO?

Hi, 
Is it possible to explain or make a concrete example of how to integrate/adapt an already finished decoder (JS for TTN) into the TagoIO payload parser?

Specifically, I have receive raw data from ChirpStack in TagoIO and I have a decoder for TTN (JS code).
So, from beginning to end. Thx!