-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheveemi.min.js
8 lines (8 loc) · 2.01 KB
/
eveemi.min.js
1
2
3
4
5
6
7
8
/*!
* EveEmi.js v1.1.4
* https://github.com/isoden/EveEmi.git
*
* Copyright (c) 2015 YU ISODA
* Licensed under the MIT license.
*/
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.EveEmi=t()}}(function(){return function t(e,n,o){function r(f,u){if(!n[f]){if(!e[f]){var c="function"==typeof require&&require;if(!u&&c)return c(f,!0);if(i)return i(f,!0);var l=new Error("Cannot find module '"+f+"'");throw l.code="MODULE_NOT_FOUND",l}var a=n[f]={exports:{}};e[f][0].call(a.exports,function(t){var n=e[f][1][t];return r(n?n:t)},a,a.exports,t,e,n,o)}return n[f].exports}for(var i="function"==typeof require&&require,f=0;f<o.length;f++)r(o[f]);return r}({1:[function(t,e,n){var o=t("./utility"),r=function(){function t(){this._allListener=[]}return t.prototype.on=function(t,e,n,r){var i=this;if(void 0===r&&(r=!1),t=o.trim(t),/\s/.test(t)){var f=t.split(" ");return o.forEach(f,function(t){return i.on(t,e,n,r)})}this._allListener.push({ctx:n,type:t,once:r,callback:e})},t.prototype.listenTo=function(t,e,n,o,r){void 0===r&&(r=!1),t.on(e,n,o,r)},t.prototype.listenToOnce=function(t,e,n,o){this.listenTo(t,e,n,o,!0)},t.prototype.stopListening=function(t,e,n){t.off(e,n)},t.prototype.off=function(t,e){var n=this;o.forEach(this._allListener,function(t,o){var r=(t.ctx,t.type,t.once,t.callback);e===r&&n._allListener.splice(o,1)})},t.prototype.once=function(t,e,n){this.on(t,e,n,!0)},t.prototype.trigger=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];o.forEach(this._allListener,function(o){var r=o.ctx,i=o.type,f=o.once,u=o.callback;i===t&&(u.apply(r,n),f&&e.off(t,u))})},t}();e.exports=r},{"./utility":2}],2:[function(t,e,n){function o(t,e,n){for(var o=0,r=t.length;r>o;o+=1)e.call(n,t[o],o,t)}function r(t){var e=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;return t.replace(e,"")}n.forEach=o,n.trim=r},{}]},{},[1])(1)});