From dfeb496e8593e28049617af32742a967e94cddff Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 4 May 2021 21:38:23 -0300 Subject: relatively acceptable HTML utility shenanigans --- upd8-util.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'upd8-util.js') diff --git a/upd8-util.js b/upd8-util.js index abeed6c..4c4186f 100644 --- a/upd8-util.js +++ b/upd8-util.js @@ -416,3 +416,8 @@ module.exports.promisifyProcess = function(proc, showLogging = true) { // Stolen from jq! Which pro8a8ly stole the concept from other places. Nice. module.exports.withEntries = (obj, fn) => Object.fromEntries(fn(Object.entries(obj))); + +// Nothin' more to it than what it says. Runs a function in-place. Provides an +// altern8tive syntax to the usual IIFEs (e.g. (() => {})()) when you want to +// open a scope and run some statements while inside an existing expression. +module.exports.call = fn => fn(); -- cgit 1.3.0-6-gf8a5