mirror of
				https://github.com/1disk/edp445.git
				synced 2024-08-14 22:47:02 +00:00 
			
		
		
		
	Changed alot of things.
This commit is contained in:
		
							parent
							
								
									a5a0523e5a
								
							
						
					
					
						commit
						3513d5390c
					
				
					 2016 changed files with 336930 additions and 9 deletions
				
			
		
							
								
								
									
										75
									
								
								node_modules/component-emitter/History.md
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								node_modules/component-emitter/History.md
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,75 @@ | |||
| 
 | ||||
| 1.3.0 / 2018-04-15 | ||||
| ================== | ||||
| 
 | ||||
|  * removed bower support | ||||
|  * expose emitter on `exports` | ||||
|  * prevent de-optimization from using `arguments` | ||||
| 
 | ||||
| 1.2.1 / 2016-04-18 | ||||
| ================== | ||||
| 
 | ||||
|  * enable client side use | ||||
| 
 | ||||
| 1.2.0 / 2014-02-12 | ||||
| ================== | ||||
| 
 | ||||
|  * prefix events with `$` to support object prototype method names | ||||
| 
 | ||||
| 1.1.3 / 2014-06-20 | ||||
| ================== | ||||
| 
 | ||||
|  * republish for npm | ||||
|  * add LICENSE file | ||||
| 
 | ||||
| 1.1.2 / 2014-02-10 | ||||
| ================== | ||||
| 
 | ||||
|   * package: rename to "component-emitter" | ||||
|   * package: update "main" and "component" fields | ||||
|   * Add license to Readme (same format as the other components) | ||||
|   * created .npmignore | ||||
|   * travis stuff | ||||
| 
 | ||||
| 1.1.1 / 2013-12-01 | ||||
| ================== | ||||
| 
 | ||||
|   * fix .once adding .on to the listener | ||||
|   * docs: Emitter#off() | ||||
|   * component: add `.repo` prop | ||||
| 
 | ||||
| 1.1.0 / 2013-10-20 | ||||
| ================== | ||||
| 
 | ||||
|  * add `.addEventListener()` and `.removeEventListener()` aliases | ||||
| 
 | ||||
| 1.0.1 / 2013-06-27 | ||||
| ================== | ||||
| 
 | ||||
|  * add support for legacy ie | ||||
| 
 | ||||
| 1.0.0 / 2013-02-26 | ||||
| ================== | ||||
| 
 | ||||
|   * add `.off()` support for removing all listeners | ||||
| 
 | ||||
| 0.0.6 / 2012-10-08 | ||||
| ================== | ||||
| 
 | ||||
|   * add `this._callbacks` initialization to prevent funky gotcha | ||||
| 
 | ||||
| 0.0.5 / 2012-09-07 | ||||
| ================== | ||||
| 
 | ||||
|   * fix `Emitter.call(this)` usage | ||||
| 
 | ||||
| 0.0.3 / 2012-07-11 | ||||
| ================== | ||||
| 
 | ||||
|   * add `.listeners()` | ||||
|   * rename `.has()` to `.hasListeners()` | ||||
| 
 | ||||
| 0.0.2 / 2012-06-28 | ||||
| ================== | ||||
| 
 | ||||
|   * fix `.off()` with `.once()`-registered callbacks | ||||
							
								
								
									
										24
									
								
								node_modules/component-emitter/LICENSE
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								node_modules/component-emitter/LICENSE
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| (The MIT License) | ||||
| 
 | ||||
| Copyright (c) 2014 Component contributors <dev@component.io> | ||||
| 
 | ||||
| Permission is hereby granted, free of charge, to any person | ||||
| obtaining a copy of this software and associated documentation | ||||
| files (the "Software"), to deal in the Software without | ||||
| restriction, including without limitation the rights to use, | ||||
| copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| copies of the Software, and to permit persons to whom the | ||||
| Software is furnished to do so, subject to the following | ||||
| conditions: | ||||
| 
 | ||||
| The above copyright notice and this permission notice shall be | ||||
| included in all copies or substantial portions of the Software. | ||||
| 
 | ||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||||
| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||||
| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||||
| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||||
| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||||
| OTHER DEALINGS IN THE SOFTWARE. | ||||
							
								
								
									
										74
									
								
								node_modules/component-emitter/Readme.md
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								node_modules/component-emitter/Readme.md
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,74 @@ | |||
| # Emitter [](https://travis-ci.org/component/emitter) | ||||
| 
 | ||||
|   Event emitter component. | ||||
| 
 | ||||
| ## Installation | ||||
| 
 | ||||
| ``` | ||||
| $ component install component/emitter | ||||
| ``` | ||||
| 
 | ||||
| ## API | ||||
| 
 | ||||
| ### Emitter(obj) | ||||
| 
 | ||||
|   The `Emitter` may also be used as a mixin. For example | ||||
|   a "plain" object may become an emitter, or you may | ||||
|   extend an existing prototype. | ||||
| 
 | ||||
|   As an `Emitter` instance: | ||||
| 
 | ||||
| ```js | ||||
| var Emitter = require('emitter'); | ||||
| var emitter = new Emitter; | ||||
| emitter.emit('something'); | ||||
| ``` | ||||
| 
 | ||||
|   As a mixin: | ||||
| 
 | ||||
| ```js | ||||
| var Emitter = require('emitter'); | ||||
| var user = { name: 'tobi' }; | ||||
| Emitter(user); | ||||
| 
 | ||||
| user.emit('im a user'); | ||||
| ``` | ||||
| 
 | ||||
|   As a prototype mixin: | ||||
| 
 | ||||
| ```js | ||||
| var Emitter = require('emitter'); | ||||
| Emitter(User.prototype); | ||||
| ``` | ||||
| 
 | ||||
| ### Emitter#on(event, fn) | ||||
| 
 | ||||
|   Register an `event` handler `fn`. | ||||
| 
 | ||||
| ### Emitter#once(event, fn) | ||||
| 
 | ||||
|   Register a single-shot `event` handler `fn`, | ||||
|   removed immediately after it is invoked the | ||||
|   first time. | ||||
| 
 | ||||
| ### Emitter#off(event, fn) | ||||
| 
 | ||||
|   * Pass `event` and `fn` to remove a listener. | ||||
|   * Pass `event` to remove all listeners on that event. | ||||
|   * Pass nothing to remove all listeners on all events. | ||||
| 
 | ||||
| ### Emitter#emit(event, ...) | ||||
| 
 | ||||
|   Emit an `event` with variable option args. | ||||
| 
 | ||||
| ### Emitter#listeners(event) | ||||
| 
 | ||||
|   Return an array of callbacks, or an empty array. | ||||
| 
 | ||||
| ### Emitter#hasListeners(event) | ||||
| 
 | ||||
|   Check if this emitter has `event` handlers. | ||||
| 
 | ||||
| ## License | ||||
| 
 | ||||
| MIT | ||||
							
								
								
									
										175
									
								
								node_modules/component-emitter/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										175
									
								
								node_modules/component-emitter/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,175 @@ | |||
| 
 | ||||
| /** | ||||
|  * Expose `Emitter`. | ||||
|  */ | ||||
| 
 | ||||
| if (typeof module !== 'undefined') { | ||||
|   module.exports = Emitter; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Initialize a new `Emitter`. | ||||
|  * | ||||
|  * @api public | ||||
|  */ | ||||
| 
 | ||||
| function Emitter(obj) { | ||||
|   if (obj) return mixin(obj); | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  * Mixin the emitter properties. | ||||
|  * | ||||
|  * @param {Object} obj | ||||
|  * @return {Object} | ||||
|  * @api private | ||||
|  */ | ||||
| 
 | ||||
| function mixin(obj) { | ||||
|   for (var key in Emitter.prototype) { | ||||
|     obj[key] = Emitter.prototype[key]; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Listen on the given `event` with `fn`. | ||||
|  * | ||||
|  * @param {String} event | ||||
|  * @param {Function} fn | ||||
|  * @return {Emitter} | ||||
|  * @api public | ||||
|  */ | ||||
| 
 | ||||
| Emitter.prototype.on = | ||||
| Emitter.prototype.addEventListener = function(event, fn){ | ||||
|   this._callbacks = this._callbacks || {}; | ||||
|   (this._callbacks['$' + event] = this._callbacks['$' + event] || []) | ||||
|     .push(fn); | ||||
|   return this; | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  * Adds an `event` listener that will be invoked a single | ||||
|  * time then automatically removed. | ||||
|  * | ||||
|  * @param {String} event | ||||
|  * @param {Function} fn | ||||
|  * @return {Emitter} | ||||
|  * @api public | ||||
|  */ | ||||
| 
 | ||||
| Emitter.prototype.once = function(event, fn){ | ||||
|   function on() { | ||||
|     this.off(event, on); | ||||
|     fn.apply(this, arguments); | ||||
|   } | ||||
| 
 | ||||
|   on.fn = fn; | ||||
|   this.on(event, on); | ||||
|   return this; | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  * Remove the given callback for `event` or all | ||||
|  * registered callbacks. | ||||
|  * | ||||
|  * @param {String} event | ||||
|  * @param {Function} fn | ||||
|  * @return {Emitter} | ||||
|  * @api public | ||||
|  */ | ||||
| 
 | ||||
| Emitter.prototype.off = | ||||
| Emitter.prototype.removeListener = | ||||
| Emitter.prototype.removeAllListeners = | ||||
| Emitter.prototype.removeEventListener = function(event, fn){ | ||||
|   this._callbacks = this._callbacks || {}; | ||||
| 
 | ||||
|   // all
 | ||||
|   if (0 == arguments.length) { | ||||
|     this._callbacks = {}; | ||||
|     return this; | ||||
|   } | ||||
| 
 | ||||
|   // specific event
 | ||||
|   var callbacks = this._callbacks['$' + event]; | ||||
|   if (!callbacks) return this; | ||||
| 
 | ||||
|   // remove all handlers
 | ||||
|   if (1 == arguments.length) { | ||||
|     delete this._callbacks['$' + event]; | ||||
|     return this; | ||||
|   } | ||||
| 
 | ||||
|   // remove specific handler
 | ||||
|   var cb; | ||||
|   for (var i = 0; i < callbacks.length; i++) { | ||||
|     cb = callbacks[i]; | ||||
|     if (cb === fn || cb.fn === fn) { | ||||
|       callbacks.splice(i, 1); | ||||
|       break; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   // Remove event specific arrays for event types that no
 | ||||
|   // one is subscribed for to avoid memory leak.
 | ||||
|   if (callbacks.length === 0) { | ||||
|     delete this._callbacks['$' + event]; | ||||
|   } | ||||
| 
 | ||||
|   return this; | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  * Emit `event` with the given args. | ||||
|  * | ||||
|  * @param {String} event | ||||
|  * @param {Mixed} ... | ||||
|  * @return {Emitter} | ||||
|  */ | ||||
| 
 | ||||
| Emitter.prototype.emit = function(event){ | ||||
|   this._callbacks = this._callbacks || {}; | ||||
| 
 | ||||
|   var args = new Array(arguments.length - 1) | ||||
|     , callbacks = this._callbacks['$' + event]; | ||||
| 
 | ||||
|   for (var i = 1; i < arguments.length; i++) { | ||||
|     args[i - 1] = arguments[i]; | ||||
|   } | ||||
| 
 | ||||
|   if (callbacks) { | ||||
|     callbacks = callbacks.slice(0); | ||||
|     for (var i = 0, len = callbacks.length; i < len; ++i) { | ||||
|       callbacks[i].apply(this, args); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   return this; | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  * Return array of callbacks for `event`. | ||||
|  * | ||||
|  * @param {String} event | ||||
|  * @return {Array} | ||||
|  * @api public | ||||
|  */ | ||||
| 
 | ||||
| Emitter.prototype.listeners = function(event){ | ||||
|   this._callbacks = this._callbacks || {}; | ||||
|   return this._callbacks['$' + event] || []; | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  * Check if this emitter has `event` handlers. | ||||
|  * | ||||
|  * @param {String} event | ||||
|  * @return {Boolean} | ||||
|  * @api public | ||||
|  */ | ||||
| 
 | ||||
| Emitter.prototype.hasListeners = function(event){ | ||||
|   return !! this.listeners(event).length; | ||||
| }; | ||||
							
								
								
									
										27
									
								
								node_modules/component-emitter/package.json
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								node_modules/component-emitter/package.json
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,27 @@ | |||
| { | ||||
|   "name": "component-emitter", | ||||
|   "description": "Event emitter", | ||||
|   "version": "1.3.0", | ||||
|   "license": "MIT", | ||||
|   "devDependencies": { | ||||
|     "mocha": "*", | ||||
|     "should": "*" | ||||
|   }, | ||||
|   "component": { | ||||
|     "scripts": { | ||||
|       "emitter/index.js": "index.js" | ||||
|     } | ||||
|   }, | ||||
|   "main": "index.js", | ||||
|   "repository": { | ||||
|     "type": "git", | ||||
|     "url": "https://github.com/component/emitter.git" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "test": "make test" | ||||
|   }, | ||||
|   "files": [ | ||||
|     "index.js", | ||||
|     "LICENSE" | ||||
|   ] | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue