object-mfr-gen
Do a map, filter or reduce generator function on object enumerable properties and change callback function whenever you want to!
Usage
Object;// or Object = ; let family = father: 'Homer' mother: 'Marge' son: 'Bart' daughter: 'Lisa' dog: 'Santa little helper' grandpa: 'Abraham' name: 'Simpson'; // helper function factory{ return { return ` ! ('s )` }} // Object.mapGen// You can do a different callback function for every property!!// Get the generatorlet mapGen = family;// start the generatorconsole; // Hello Homer! (Simpson's father)// change the callback functionconsole; // Hi Marge! (Simpson's mother)// keep the last the callback functionconsole; // Hi Bart! (Simpson's son)// change againconsole; // Greetings Lisa! (Simpson's daughter) // Object.filterGen// You can do a different callback function for every property// and check if the value has been deleted at the next().valuelet filterGen = family;let result1 = filterGennextvalue;console; // Homer is ok.let result2 = filterGennextvalue;console; // Marge is deleted.// change the callback functionlet result3 = filterGennext{ return val !== -1}value;console; // Bart is ok.let result4 = filterGennextvalue;console; // Lisa is deleted. // Object.reduceGen// You can do a different callback function for every property// and check how the reducing value is changing at next().valuelet reduceGen = family;// start the generatorconsole; // value: 1console; // value: 2// change the callback functionconsole; // value: 3console; // value: 4