Commit f563c978 authored by Tristan Cavelier's avatar Tristan Cavelier

replicaterevisionstorage amd compatible now

parent 286266f6
/*jslint indent: 2, maxlen: 80, nomen: true */
/*global jIO: true */
/*global jIO, define */
/**
* JIO Replicate Revision Storage.
* It manages storages that manage revisions and conflicts.
......@@ -12,8 +13,16 @@
* ]
* }
*/
jIO.addStorageType('replicaterevision', function (spec, my) {
// define([module_name], [dependencies], module);
(function (dependencies, module) {
"use strict";
if (typeof define === 'function' && define.amd) {
return define(dependencies, module);
}
module(jIO);
}(['jio'], function (jIO) {
"use strict";
jIO.addStorageType('replicaterevision', function (spec, my) {
var that, priv = {};
spec = spec || {};
that = my.basicStorage(spec, my);
......@@ -154,7 +163,12 @@ jIO.addStorageType('replicaterevision', function (spec, my) {
* - {object} The error object
* - {object} The response object
*/
priv.sendToAllFastestResponseOnly = function (method, doc, option, callback) {
priv.sendToAllFastestResponseOnly = function (
method,
doc,
option,
callback
) {
var i, callbackWrapper, error_count, last_error;
error_count = 0;
callbackWrapper = function (method, index, err, response) {
......@@ -674,4 +688,5 @@ jIO.addStorageType('replicaterevision', function (spec, my) {
};
return that;
});
});
}));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment