Q:

How to create Factory Functions instead of using Classes

I am using a javascript library that is implementing ES6 class in their modules. I have not used classical inheritance in javascript and would like to essentially "undo" their class implementation. Is there a way I can take those classes and still use them in a Factory/Composition approach. I want to take advantage of JS prototypal inheritance and easy compostability of objects. The following is an example of what I have so far. Ultimately I am trying to avoid using class and new, because I am not used to using it in JavaScript. Could anyone tell me if I am approaching this in the right way or if I am just wasting my time, thank you.
class Example {

 constructor(id) {
  this.id = id;
 }

 getID() {
  console.log(this.id);
 }
}

function convertClassToObject(theClass) {
 var x = new theClass();
 var newX = Object.create(x);
 return newX;
}

var NewPrototype = convertClassToObject(Example);

function NewFactory(options) {
 var x = Object.assign(Object.create(NewPrototype), options);
 return x;
}

var NewInstance = NewFactory({id: 123456789});

A:

You should rather get used to new, it's much simpler than doing prototypical inheritance in factories.
Of course, it's trivial to convert a constructor function to a factory function:
function classToFactory(constr) {
    return (...args) => new constr(...args);
}

const makeExample = classToFactory(Example);
const newInstance = makeExample(123456789); // no `new` any more

