mirror of
https://github.com/moodle/moodle.git
synced 2025-02-27 21:43:23 +01:00
10 lines
927 B
JavaScript
10 lines
927 B
JavaScript
define("core/normalise",["exports","jquery"],(function(_exports,_jquery){var obj;
|
|
/**
|
|
* Normalisation helpers.
|
|
*
|
|
* @module core/normalise
|
|
* @copyright 2020 Andrew Nicols <andrew@nicols.co.uk>
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.getList=_exports.getFirst=_exports.getElement=void 0,_jquery=(obj=_jquery)&&obj.__esModule?obj:{default:obj};const getList=nodes=>nodes instanceof HTMLElement?[nodes]:nodes instanceof Array?nodes:nodes instanceof NodeList?Array.from(nodes):nodes instanceof _jquery.default?nodes.get():Array.from(nodes);_exports.getList=getList;_exports.getFirst=nodes=>getList(nodes)[0];_exports.getElement=node=>node instanceof HTMLElement?node:null!=node&&node._node?node._node:node instanceof _jquery.default&&node.length>0?node.get(0):null}));
|
|
|
|
//# sourceMappingURL=normalise.min.js.map
|