I want create object factory using ES6 but old-style syntax doesn\'t work with new.
I have next code:
export class Column {} export class Sequence {}
There is a small & dirty way to do that:
function createClassByName(name,...a) { var c = eval(name); return new c(...a); }
You can now create a class like that:
let c = createClassByName( 'Person', x, y );