Deleted examples, beginning to write in EC6.

Examples and Hydrabot will soon live in a separate repo which is better
suited to learning - this is so the main package isn't bloated.
This commit is contained in:
hydrabolt
2015-08-23 16:55:23 +01:00
parent 16b007c635
commit 35b61312b9
40 changed files with 1830 additions and 2486 deletions

View File

@@ -1,8 +1,11 @@
"use strict";
var List = require("./list.js").List;
exports.Channel = function(name, server, type, id, isPrivate){
exports.Channel = function (name, server, type, id, isPrivate) {
if(!type){ //there's no second argument
if (!type) {
//there's no second argument
var channel = name;
name = channel.name;
server = server;
@@ -17,12 +20,12 @@ exports.Channel = function(name, server, type, id, isPrivate){
this.id = id;
this.isPrivate = isPrivate;
this.messages = new List("id", 5000);
}
};
exports.Channel.equals = function(otherChannel){
if(otherChannel.id === this.id){
exports.Channel.equals = function (otherChannel) {
if (otherChannel.id === this.id) {
return true;
} else {
return false;
}
}
};