From 988cb388b43a27d362b235ac6248661a7a6374f9 Mon Sep 17 00:00:00 2001 From: sixertoy Date: Wed, 29 Jul 2015 10:21:14 +0200 Subject: [PATCH] update --- grunt/aliases.yml | 2 +- lib/circular-json.js | 10 +++++----- lib/object-utils.js | 36 ++++++++++++++++++++++++++---------- lib/regex-utils.js | 4 ++-- package.json | 2 +- 5 files changed, 35 insertions(+), 19 deletions(-) diff --git a/grunt/aliases.yml b/grunt/aliases.yml index 2e192d2..d607a79 100644 --- a/grunt/aliases.yml +++ b/grunt/aliases.yml @@ -3,8 +3,8 @@ build: - autoprefixer package: - jshint - - build - bump + - build - compress default: - jshint diff --git a/lib/circular-json.js b/lib/circular-json.js index 9d519a4..d63900d 100644 --- a/lib/circular-json.js +++ b/lib/circular-json.js @@ -6,13 +6,13 @@ define(function (require, exports, module) { module.exports = { serialize: function () { var seen = []; - return function(key, value) { + return function (key, value) { if (_.isPlainObject(value) && !_.isEmpty(key)) { // Si la valeur de la cle // Est deja referencee en tant que value - if (seen.indexOf(value) !== -1){ + if (seen.indexOf(value) !== -1) { return 'yooooo'; - } else{ + } else { seen.push(value); return 'yooooo'; } @@ -20,9 +20,9 @@ define(function (require, exports, module) { return 'yooooo'; }; }, - stringify :function (obj) { + stringify: function (obj) { return 'yo'; // return JSON.stringify(obj, this.serialize(), 4); } }; -}); +}); \ No newline at end of file diff --git a/lib/object-utils.js b/lib/object-utils.js index c73f67d..c312d19 100644 --- a/lib/object-utils.js +++ b/lib/object-utils.js @@ -5,7 +5,7 @@ define(function (require, exports, module) { module.exports = { - equals: function(x, y) { + equals: function (x, y) { // if both are function if (x instanceof Function) { if (y instanceof Function) { @@ -13,21 +13,37 @@ define(function (require, exports, module) { } return false; } - if (x === null || x === undefined || y === null || y === undefined) { return x === y; } - if (x === y || x.valueOf() === y.valueOf()) { return true; } + if (x === null || x === undefined || y === null || y === undefined) { + return x === y; + } + if (x === y || x.valueOf() === y.valueOf()) { + return true; + } // if one of them is date, they must had equal valueOf - if (x instanceof Date) { return false; } - if (y instanceof Date) { return false; } + if (x instanceof Date) { + return false; + } + if (y instanceof Date) { + return false; + } // if they are not function or strictly equal, they both need to be Objects - if (!(x instanceof Object)) { return false; } - if (!(y instanceof Object)) { return false; } + if (!(x instanceof Object)) { + return false; + } + if (!(y instanceof Object)) { + return false; + } var p = Object.keys(x); - return Object.keys(y).every(function (i) { return p.indexOf(i) !== -1; }) ? - p.every(function (i) { return this.equals(x[i], y[i]); }) : false; + return Object.keys(y).every(function (i) { + return p.indexOf(i) !== -1; + }) ? + p.every(function (i) { + return this.equals(x[i], y[i]); + }) : false; } }; -}); +}); \ No newline at end of file diff --git a/lib/regex-utils.js b/lib/regex-utils.js index 23513d4..1ab94ac 100644 --- a/lib/regex-utils.js +++ b/lib/regex-utils.js @@ -12,10 +12,10 @@ define(function (require, exports, module) { return (/(file:?\/{2,3}(([a-zA-Z])?((:|\|))*)?\/?(.+)?((.js)|(.html)|(.php))+)/gi); }, - lineAndColumn :function () { + lineAndColumn: function () { return (/(\(?:[0-9]+)/gi); } }; -}); +}); \ No newline at end of file diff --git a/package.json b/package.json index 835ae9d..f2ffa89 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "malas34.brackets-console-plus", "title": "Console Plus", - "version": "1.4.6", + "version": "1.4.8", "description": "Shows console.logs &.errors without leaving Brackets. + Toolbar Icon & Notifier, Filters by logs/errors, Errors stacks details and.... a very nice look + Update: log window object error", "homepage": "https://github.com/sixertoy/brackets-console-plus", "author": {