src/index.js
function firstResult(items, fn) {
	for (const item of items) {
		if (!item) {
			continue;
		}

		const result = fn(item);
		if (result) {
			return result;
		}
	}
	return undefined;
}
function firstResult(items, fn) {
	for (const item of items) {
		if (!item) {
			continue;
		}

		const result = fn(item);
		if (result) {
			return result;
		}
	}
	return undefined;
}
function firstResult ( items , fn ) { for ( const item of items ) { if ( ! item ) { continue ; } const result = fn ( item ) ; if ( result ) { return result ; } } return undefined ; }
Return the first truthy result of a callback.

@param {any[]} items
@param {Function} fn
@return {any}
Return the first truthy result of a callback .