Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Commit

Permalink
optimize performance
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed May 23, 2013
1 parent 605def4 commit 163142d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
4 changes: 3 additions & 1 deletion lib/domain/bases/aggregateBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Aggregate.prototype = {
},

toJSON: function() {
return _.clone(this.attributes, true);
var parse = JSON.deserialize || JSON.parse;
var json = parse(JSON.stringify(this.attributes));
return json;
},

toEvent: function(name, data) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "adrai",
"name": "node-cqs",
"version": "0.3.6",
"version": "0.3.7",
"private": false,
"main": "index.js",
"engines": {
Expand Down

0 comments on commit 163142d

Please sign in to comment.