# Is it possible to modify a function in a helper via the plugin or theme component system?

**URL:** https://meta.discourse.org/t/is-it-possible-to-modify-a-function-in-a-helper-via-the-plugin-or-theme-component-system/140964
**Category:** Development
**Created:** [February 7, 2020, 8:09am UTC](https://meta.discourse.org/t/is-it-possible-to-modify-a-function-in-a-helper-via-the-plugin-or-theme-component-system/140964 "2020-02-07T08:09:35Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [February 7, 2020, 5:45pm UTC](https://meta.discourse.org/t/is-it-possible-to-modify-a-function-in-a-helper-via-the-plugin-or-theme-component-system/140964/4 "2020-02-07T17:45:20Z")

</div>

> [@justin](#):
>
> There are a number of ways to do what you’re asking. What’s your aim on overwriting `categoryStripe` ?

I’d like to change it from:

```js
function categoryStripe(color, classes) {
  var style = color ? "style='background-color: #" + color + ";'" : "";
  return "<span class='" + classes + "' " + style + "></span>";
}

```

to:

```js
function categoryStripe(color, classes) {
  var style = color ? "style='border: 1px solid #" + color + ";'" : "";
  return "<span class='" + "my-class" + classes + "' " + style + "></span>";
}

```

So changing background colour to a border and adding a class.

What’s the best way to achieve this Justin?

* * *

> [@pfaffman](#):
>
> I believe so. Have you seen [Developer’s guide to Discourse Themes](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648)

I did read that, however IIRC it only covers the ability to overwrite templates (and widgets) with no mention of helpers, I think?

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-modify-a-function-in-a-helper-via-the-plugin-or-theme-component-system/140964)._
