Custom JS helper

Maybe a weird question but is there a way to overwrite/customize the default js() helper?
Without messing with the core obviously.

There’s two things I’d love to add to it but I’m not sure what’s the best way to do it.

No need to overwrite it, you can just create your own helper function.

Can I just grab the current implementation and register my own js() function?
Now that I think about it I could simply try do it and see what happens :sweat_smile:

Yes, exactly, just use another name for your function. For another option have a look at one of the buster plugins:

1 Like

I was actually looking into this right now which seems exactly what I’m looking for.

Yes, that’s the same the plugin does.

Extending the core component worked like a charm :ok_hand:

1 Like