6 lines
129 B
JavaScript
6 lines
129 B
JavaScript
'use strict'
|
|
|
|
module.exports = function coalesce(...candidates) {
|
|
return candidates.find(c => c !== undefined && c !== null)
|
|
}
|