(node v4.4.7)
'use strict'; class Hoge { constructor() { this.price = 50; } static getInstance(object) { const instanse = new this(); Object.keys(object).map(key => { instanse[key] = object[key]; }); return instanse; } } class Fuga extends Hoge { constructor() { super(); this.name = 'kids'; } static getInstance(object) { let instanse = super.getInstance(object); instanse.price = instanse.price * 100; return instanse; } } const hoge = new Hoge(); console.log(hoge); console.log(Hoge.getInstance({price: 100})); const fuga = new Fuga(); console.log(fuga); console.log(Fuga.getInstance({price: 200})); //=> Hoge { price: 50 } //=> Hoge { price: 100 } //=> Fuga { price: 50, name: 'kids' } //=> Fuga { price: 20000, name: 'kids' }