/**
* Returns a new object after merging two, or more objects.
*
- * Or use https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/
- * Global_Objects/Object/assign.
+ * Inspired by @adamfschwartz, @zackbloom, http://youmightnotneedjquery.com.
*
* @name dBlazy.extend
*
- * Inspired by @adamfschwartz, @zackbloom, http://youmightnotneedjquery.com.
- *
* @param {Object} out
* The objects to merge together.
*
}
};
+ /**
+ * A simple hasClass wrapper.
+ *
+ * @name dBlazy.hasClass
+ *
+ * @param {Element} el
+ * The HTML element.
+ * @param {String} name
+ * The class name.
+ *
+ * @return {bool}
+ * True if of of the method is supported.
+ */
+ dBlazy.hasClass = function (el, name) {
+ if (el.classList) {
+ return el.classList.contains(name);
+ }
+ else {
+ return el.className.indexOf(name) !== -1;
+ }
+ };
+
/**
* A simple wrapper for event delegation like jQuery.on().
*