ember-auto-save
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -57,4 +57,6 @@ /** | ||
@param {Integer} time The time to wait before saving. | ||
@param {Boolean} immediate Trigger the function on the leading instead | ||
of the trailing edge of the wait interval. Defaults to false. | ||
*/ | ||
export default function(model, time) { | ||
export default function(model, time, immediate) { | ||
if ( isNaN(time) || time < 0 ) { time = 2000; } | ||
@@ -70,3 +72,3 @@ assert(`'model' should be an object`, typeof model === 'object'); | ||
Ember.run.debounce(model, model.save, time); | ||
Ember.run.debounce(model, model.save, time, immediate); | ||
} |
@@ -1,3 +0,10 @@ | ||
# Change Log | ||
# CHANGELOG | ||
### v0.0.5 2016-10-11 | ||
* [#1](https://github.com/lozjackson/ember-auto-save/pull/1) Add `immediate` option to the `save()` method. | ||
### v0.0.4 2016-08-15 | ||
@@ -4,0 +11,0 @@ |
@@ -6,3 +6,3 @@ { | ||
"url": "https://github.com/lozjackson/ember-auto-save", | ||
"version": "0.0.4" | ||
"version": "0.0.5" | ||
}, | ||
@@ -236,2 +236,7 @@ "files": { | ||
"type": "Integer" | ||
}, | ||
{ | ||
"name": "immediate", | ||
"description": "Trigger the function on the leading instead\n of the trailing edge of the wait interval. Defaults to false.", | ||
"type": "Boolean" | ||
} | ||
@@ -238,0 +243,0 @@ ], |
{ | ||
"name": "ember-auto-save", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "An Ember-cli addon that provides auto-save functionality for Ember applications.", | ||
@@ -5,0 +5,0 @@ "directories": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
191191
1773