/otdt

An alternative syntax for IIFEs

Primary LanguageJavaScript

otdt

otdt offers an alternative syntax for IIFEs.

It's an abbreviation of "on these, do this".

// The normal way:
((a, b) => a + b)(1, 2)

// With otdt:
const e = require('otdt');
e((a = 1, b = 2) => a + b);

// Alternatively:
const e = require('otdt');
e(1, 2, (a, b) => a + b)