Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
Hi @ecyrbe , didn't found any other solution to this specifically.
It's nothing rocket science, it just creates a constructor based on a bunch of data in a string.
Either be from an object keys or a string gathered from a key-value array or simply a dynamically generated string.
You can then, instantiate MyDynamicClass like that:
constmyDynamicObject=newMyDynamicClass();
Now you've an instance of that class and you can propagate data into it like that:
myDynamicObject.propagateArray(myArray);myDynamicObject.propagateObject(myObject);// or just like that:myDynamicObject.name='Joel';myDynamicObject.surname='Bonet';
That's what the lib automates. As I said, nothing rocket science but maybe we can come with some great ideas to add as methods so Objects generated this way will inherit and have available once instantiated, as example.
@jzombie You got a nice idea there, why don't you add a PR into the project so you appear as collaborator? 😀
@adam_cyclones The aim is to dynamically generate those constructors while providing a simple API into this generated objects, if you mind, you can create a PoC using TS instead so we can learn and see how it will work! 😁
Thank you guys!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi @ecyrbe , didn't found any other solution to this specifically.
It's nothing rocket science, it just creates a constructor based on a bunch of data in a string.
Either be from an object keys or a string gathered from a key-value array or simply a dynamically generated string.
You can then, instantiate
MyDynamicClass
like that:Now you've an instance of that class and you can propagate data into it like that:
That's what the lib automates. As I said, nothing rocket science but maybe we can come with some great ideas to add as methods so Objects generated this way will inherit and have available once instantiated, as example.
@jzombie You got a nice idea there, why don't you add a PR into the project so you appear as collaborator? 😀
@adam_cyclones The aim is to dynamically generate those constructors while providing a simple API into this generated objects, if you mind, you can create a PoC using TS instead so we can learn and see how it will work! 😁
Thank you guys!