removing unused variable initializations in es6 and es5 files for errors

adding gitignore and npmignore files to avoid committing
This commit is contained in:
Val Vinder 2017-02-14 10:02:05 -08:00
parent eb96e92da5
commit 74d5410043
5 changed files with 39 additions and 150 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
npm-debug.log

1
.npmignore Normal file
View file

@ -0,0 +1 @@
examples/

6
es5.js
View file

@ -9,8 +9,7 @@ function EventPubSub() {
function on(type,handler){
if(!handler){
const err=new ReferenceError('handler not defined.');
throw(err);
throw new ReferenceError('handler not defined.');
}
if(!this._events_[type]){
@ -27,8 +26,7 @@ function EventPubSub() {
}
if(!handler){
var err=new ReferenceError('handler not defined. if you wish to remove all handlers from the event please pass "*" as the handler');
throw err;
throw new ReferenceError('handler not defined. if you wish to remove all handlers from the event please pass "*" as the handler');
}
if(handler=='*'){

6
es6.js
View file

@ -10,8 +10,7 @@ class EventPubSub {
on( type, handler ) {
if ( !handler ) {
const err=new ReferenceError('handler not defined.');
throw(err);
throw new ReferenceError( 'handler not defined.' );
}
if ( !this._events_[ type ] ) {
@ -28,8 +27,7 @@ class EventPubSub {
}
if ( !handler ) {
var err=new ReferenceError('handler not defined. if you wish to remove all handlers from the event please pass "*" as the handler');
throw err;
throw new ReferenceError( 'handler not defined. if you wish to remove all handlers from the event please pass "*" as the handler' );
}
if ( handler == '*' ) {

File diff suppressed because one or more lines are too long