mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
git-subtree-dir: packages/pjax git-subtree-split: 8abb21e1e9d899217b03c489c9b2d9ecd92074b5
9 lines
297 B
JavaScript
9 lines
297 B
JavaScript
/* global HTMLCollection: true */
|
|
|
|
module.exports = function(els, fn, context) {
|
|
if (els instanceof HTMLCollection || els instanceof NodeList || els instanceof Array) {
|
|
return Array.prototype.forEach.call(els, fn, context)
|
|
}
|
|
// assume simple DOM element
|
|
return fn.call(context, els)
|
|
}
|