Skip to content

COMPARE

Subhajit Sahu edited this page Aug 7, 2022 · 1 revision

Compare two values.

Similar: ARGUMENTS, NOOP, IDENTITY, COMPARE.


function COMPARE(a, b)
// a: a value
// b: another value
const xasyncfn = require('extra-async-function');


await xasyncfn.COMPARE(1, 2);
// → -1

await xasyncfn.COMPARE(2, 2);
// → 0

await xasyncfn.COMPARE(3, 2);
// → 1

await xasyncfn.COMPARE('a', Promise.resolve('b'));
// → -1
Clone this wiki locally