How can I use static helper methods in the constructor (without declaring them there)?
<p>I'm learning ES6 classes. Is there a way to make helper functions (eg for data munging) accessible to the constructor, but also elsewhere, so that I'm not typing out the function twice (as an IIFE in the constructor and a static class method too)? </p>

<p>Eg at the moment I'm doing because <code>getDimensions</code> is not callable in the constructor:</p>

<pre><code>class Foo {

    constructor(data){
        this._data = data;
        let dimensions = function(data){
            //return some dimensions
        }(data);
        this._x = d3.scaleLinear().domain([dimensions])...
    }

    static getDimensions(someData){
        //same calcs as the constructor IIFE
    }

    updateScale(newData){
        let dimensions = getDimensions(newData);
        this.x = d3.scaleLinear().domain([dimensions]);
    }
}
</code></pre>

<p>Is it possible/sensible to get myself a static helper method that I can use in my prototype methods and in the constructor?</p>