title: Javascript - Same name for static and instance methods bad practice?
body: <p>In Javascript, is it considered bad practice to give a static method and an instance method the same name?</p>
  
  <p>Suppose I have a class that represents a database table (<code>Model</code>) and I wanted to provide 2 options for fetching some value: (1) with an id, (2) through an instance:</p>
  
  <pre><code>class Foo extends Model {
  
    static getById(id) {
      return Foo.query().findById(id);
    }
  
    static getBars(id, limit, offset) {
      return Foo.getById(id).then(foo =&gt; foo.getBars(limit, offset));
    }
  
    getBars(limit, offset) {
      return this.$relatedQuery('bars').range(limit, offset);
    }
  
  }
  </code></pre>
  
  <p>This example uses Objection JS.</p>
  
  <p>So if you already have an instance of <code>Foo</code> called <code>foo</code>, you can just call <code>foo.getBars(10, 0)</code>, rather than <code>Foo.getBars(fooId, 10, 0)</code>.</p>