Instead of this:
let thing = somelet aThing = somelet thisThing = somelet thatThing = somelet theOtherThing = some//...and so on!
const eachVar =let thing aThing thisThingthatThing theOtherThing =
More signal, less noise.
How It Works
eachVar(iterateeFunction) is a function which invokes its input function with a string of each variable name on the left of the destructuring assignment in order,
removing the need to repeat them on each side of the equal sign, and maybe encouraging more meaningful names.
Or you could describe it as an iterator across variable names.
const eachVar =const dryquire =const fs crypto util http os repl express "package.json":scripts = dryquireconst sqlA sqlB sqlC sqlD =