Skip to content

Commit

Permalink
Bump to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
scottcorgan committed Sep 16, 2014
1 parent 9287059 commit 81532e3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "tiny-emitter",
"main": "dist/tinyemitter.js",
"version": "0.1.8",
"version": "1.0.0",
"homepage": "https://github.com/scottcorgan/tiny-emitter",
"authors": [
"Scott Corgan <scottcorgan@gmail.com>"
Expand Down
8 changes: 5 additions & 3 deletions dist/tinyemitter.js
@@ -1,11 +1,11 @@
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.TinyEmitter=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
function E () {
// Keep this empty so it's easier to inherit from
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
}

E.prototype = {
on: function (name, callback, ctx) {
on: function (name, callback, ctx) {
var e = this.e || (this.e = {});

(e[name] || (e[name] = [])).push({
Expand All @@ -28,7 +28,7 @@ E.prototype = {

emit: function (name) {
var data = [].slice.call(arguments, 1);
var evtArr = (this.e[name] || []).slice();
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
var i = 0;
var len = evtArr.length;

Expand All @@ -53,6 +53,7 @@ E.prototype = {
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910

(liveEvents.length)
? e[name] = liveEvents
: delete e[name];
Expand All @@ -62,6 +63,7 @@ E.prototype = {
};

module.exports = E;

},{}]},{},[1])
(1)
});
2 changes: 1 addition & 1 deletion dist/tinyemitter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "tiny-emitter",
"version": "0.1.12",
"version": "1.0.0",
"description": "A tiny (less than 1k) event emitter library",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 81532e3

Please sign in to comment.