remove babel and grunt from dependencies #18

Merged
amovah merged 6 commits from master into master 2016-03-28 14:52:32 +00:00
6 changed files with 18 additions and 10 deletions
Showing only changes of commit 23cff62505 - Show all commits

View File

@ -49,7 +49,9 @@ function argumentParser(format, string) {
string = string.replace(/[^\s]+/, '').trim(); string = string.replace(/[^\s]+/, '').trim();
format = format.replace(/[^\s]+/, '').trim(); format = format.replace(/[^\s]+/, '').trim();
if (!format) return { args: {}, params: {} }; if (!format) {
return { args: {}, params: {} };
}
var indexes = [], var indexes = [],
params = {}; params = {};
@ -77,7 +79,9 @@ function argumentParser(format, string) {
return getFormat(null, 'rest'); return getFormat(null, 'rest');
}); });
if (!string) return { args: {}, params: params }; if (!string) {
return { args: {}, params: params };
}
indexes = indexes.sort(function (a, b) { indexes = indexes.sort(function (a, b) {
return a.offset < b.offset ? -1 : 1; return a.offset < b.offset ? -1 : 1;

View File

@ -11,7 +11,9 @@ function poll(bot) {
} }
bot.emit('update', response.result); bot.emit('update', response.result);
if (bot._stop) return null; if (bot._stop) {
return null;
}
return poll(bot); return poll(bot);
}); });
} }

View File

@ -69,8 +69,6 @@ var DEFAULTS = {
var REQUIRED = 0; var REQUIRED = 0;
console.log(_poll2.default);
/** /**
* Bot class used to connect to a new bot * Bot class used to connect to a new bot
* Bots have an api property which gives access to all Telegram API methods, * Bots have an api property which gives access to all Telegram API methods,

View File

@ -40,7 +40,9 @@ export default function argumentParser(format, string) {
string = string.replace(/[^\s]+/, '').trim(); string = string.replace(/[^\s]+/, '').trim();
format = format.replace(/[^\s]+/, '').trim(); format = format.replace(/[^\s]+/, '').trim();
if (!format) return {args: {}, params: {}}; if (!format) {
return {args: {}, params: {}};
}
let indexes = [], let indexes = [],
params = {}; params = {};
@ -64,7 +66,9 @@ export default function argumentParser(format, string) {
return getFormat(null, 'rest'); return getFormat(null, 'rest');
}); });
if (!string) return {args: {}, params}; if (!string) {
return {args: {}, params};
}
indexes = indexes.sort((a, b) => { indexes = indexes.sort((a, b) => {
return a.offset < b.offset ? -1 : 1; return a.offset < b.offset ? -1 : 1;

View File

@ -5,7 +5,9 @@ export default function poll(bot) {
} }
bot.emit('update', response.result); bot.emit('update', response.result);
if (bot._stop) return null; if (bot._stop) {
return null;
}
return poll(bot); return poll(bot);
}); });
} }

View File

@ -21,8 +21,6 @@ const DEFAULTS = {
const REQUIRED = 0; const REQUIRED = 0;
console.log(poll);
/** /**
* Bot class used to connect to a new bot * Bot class used to connect to a new bot
* Bots have an api property which gives access to all Telegram API methods, * Bots have an api property which gives access to all Telegram API methods,