viewmodel
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -52,3 +52,3 @@ 'use strict'; | ||
}, | ||
/** | ||
@@ -55,0 +55,0 @@ * Use this function to push something in the queue. |
@@ -156,3 +156,3 @@ 'use strict'; | ||
this.checkConnection(); | ||
if(!vm.actionOnCommit) return callback(new Error()); | ||
@@ -159,0 +159,0 @@ |
@@ -19,3 +19,3 @@ 'use strict'; | ||
options.type = options.type.toLowerCase(); | ||
var dbPath = __dirname + "/databases/" + options.type + ".js"; | ||
@@ -112,2 +112,7 @@ | ||
var repo = init(options); | ||
var orgCommit = repo.commit; | ||
repo.commit = function (vm, callback) { | ||
vm.set('commitStamp', (new Date()).getTime()); | ||
orgCommit.apply(this, [vm, callback]); | ||
}; | ||
var orgFind = repo.find; | ||
@@ -160,3 +165,3 @@ repo.find = function (query, queryOptions, callback) { | ||
var repo = init(options); | ||
// remove write stuff!!! | ||
@@ -163,0 +168,0 @@ repo.commit = function (vm, callback) { |
@@ -10,3 +10,3 @@ 'use strict'; | ||
* ViewModel constructor | ||
* @param {String} id The id of this viewmodel instance. | ||
* @param {String} attr The attributes of this viewmodel instance. | ||
*/ | ||
@@ -66,3 +66,3 @@ function ViewModel (attr, repository) { | ||
* Sets attributes for the vm. | ||
* | ||
* | ||
* @example: | ||
@@ -69,0 +69,0 @@ * vm.set('firstname', 'Jack'); |
{ | ||
"author": "adrai", | ||
"name": "viewmodel", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -0,1 +1,4 @@ | ||
## [v1.2.3](https://github.com/adrai/node-viewmodel/compare/v1.2.2...v1.2.3) | ||
- automatically add commitStamp on commit | ||
## v1.2.2 | ||
@@ -2,0 +5,0 @@ - azure-table: fix issue in getEvents [#7](https://github.com/adrai/node-viewmodel/pull/7) thanks to [rvin100](https://github.com/rvin100) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66245
1808