You could also just export it:

```js
export function getVariableName(name) {
  ...
}
```

It has really no dependency to the class.