@xassist/xassist-main
Version:
main functions with onready, id-generator and templating engine
7 lines • 871 B
JavaScript
/**
* @preserve
* https://github.com/GregBee2/xassist-main#readme Version 1.0.4.
* Copyright 2018 Gregory Beirens.
* Created on Mon, 30 Jul 2018 09:59:16 GMT.
*/
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.xa=e.xa||{})}(this,function(e){"use strict";var t,n=Math.round(1e6*Math.random()),o=[],r=!1;document.addEventListener("DOMContentLoaded",function(){t=arguments[0],o.forEach(function(e){e[0].call(e[1],t)}),o=[],r=!0},{once:!0}),e.id=function(e){return(arguments.length?e+"_":"")+n++},e.ready=function(e,n){n||(n=document),r?e.call(n,t):o.push([e,n])},e.template=function(e,t,o){return o=o||"",e.replace(/\${([^}]*)}/g,function(e,n){return n.split(".").reduce(function(e,n){return e.hasOwnProperty(n)?e[n]:o},t)})},Object.defineProperty(e,"__esModule",{value:!0})});