code: function (items) {
      // check for dom element
      // thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
      if (typeof HTMLElement === 'object' ? items instanceof HTMLElement : items && typeof items === 'object' && items !== null && items.nodeType === 1 && typeof items.nodeName === 'string') {
          items = [items];
      }
  
      const options = arguments[1];
      const args = Array.prototype.slice.call(arguments, 2);
      const len = items.length;
      let k = 0;
      let ret;
  
      for (k; k < len; k++) {
          if (typeof options === 'object' || typeof options === 'undefined') {
              if (!items[k].jarallax) {
                  items[k].jarallax = new Jarallax(items[k], options);
              }
          } else if (items[k].jarallax) {
              // eslint-disable-next-line prefer-spread
              ret = items[k].jarallax[options].apply(items[k].jarallax, args);
          }
          if (typeof ret !== 'undefined') {
              return ret;
          }
      }
  
      return items;
  }
docs: global definition