UNPKG

sugar

Version:

A Javascript utility library for working with native objects.

10 lines (8 loc) 219 B
'use strict'; function functionMatcher(fn) { return function(el, i, arr) { // Return true up front if match by reference return el === fn || fn.call(arr, el, i, arr); }; } module.exports = functionMatcher;