Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sixertoy committed Jul 29, 2015
1 parent 44a1db4 commit 988cb38
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 19 deletions.
2 changes: 1 addition & 1 deletion grunt/aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ build:
- autoprefixer
package:
- jshint
- build
- bump
- build
- compress
default:
- jshint
Expand Down
10 changes: 5 additions & 5 deletions lib/circular-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ 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';
}
}
return 'yooooo';
};
},
stringify :function (obj) {
stringify: function (obj) {
return 'yo';
// return JSON.stringify(obj, this.serialize(), 4);
}
};
});
});
36 changes: 26 additions & 10 deletions lib/object-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,45 @@ 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) {
return x.toString() === y.toString();
}
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;
}
};

});
});
4 changes: 2 additions & 2 deletions lib/regex-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

};

});
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 988cb38

Please sign in to comment.