ES script code duplication

We have two scripts with almost same code.
Is there any way we can remove code duplication between the scripts?
Like including / calling one script from other?

There is no way to call one script from another. But you could parameterize the script with the pieces that are different and pass those in via params?

Thanks @rjernst

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.