UNPKG

extant

Version:

Basically, SQL COALESCE in JavaScript; return the first value that is not null.

9 lines (8 loc) 189 B
module.exports = function () { for (var i = 0, I = arguments.length; i < I; i++) { if (arguments[i] != null) { return arguments[i] } } return null }