This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Extract only data attributes from an element (or a jQuery element) and return it as an object | |
* @param {Element} el JS raw element or jQuery element | |
* @param {String} dataTag data key from extract the rest. Could start with "data-" or not | |
* @param {Boolean} camelCase keys returned camelCased or not | |
* @return {Object} | |
* | |
* IMPORTANT: It use lodash/underscore as a dependency! | |
* IMPORTANT: Made in ES6 | |
* |