ThisOrThat
Purposes
Let's you give an object with a template. It'll fill the object within defined template.
Usage
Here is an example :
let thisOrThat = ;// You have your objectlet myObject = firstname: 'Bob' age: 20;// But your object MUST have these properties and will merge them togetherconst TEMPLATE = firstname: 'John' lastname: 'Doe' age: 18// There is two way of doing it. Since it it a recursive function you can pass// a structured object as third parameter// Firstlet output = ;// Secondlet output = {};output = ;
Conclusion
Thank you for using, testing and improving it and feel free to contact me for any question.
Ending joke :
I’ve got a really good UDP joke to tell you, but I don’t know if you’ll get it