src/shared/helpers.js
/**
 * @function
 * Tests whether an object is a DOM element.
 * Via: https://stackoverflow.com/a/384380/467760
 */
@function
Tests whether an object is a DOM element.
@function Tests whether an object is a DOM element .
function isElement(o) {
  return typeof HTMLElement === 'object'
    ? o instanceof HTMLElement 
    : o &&
        typeof o === 'object' &&
        o !== null &&
        o.nodeType === 1 &&
        typeof o.nodeName === 'string';
}
function isElement ( o ) { return typeof HTMLElement === 'object' ? o instanceof HTMLElement : o && typeof o === 'object' && o !== null && o . nodeType === 1 && typeof o . nodeName === 'string' ; }
@function
 Tests whether an object is a DOM element.
@function Tests whether an object is a DOM element .
// DOM2