Comparing version 1.0.0 to 1.0.1
15
index.js
@@ -7,8 +7,15 @@ | ||
exports.apply = function(snapshot, op) { | ||
exports.apply = function(snapshot, ops) { | ||
ops | ||
.forEach(function(op) { | ||
op.apply(snapshot) | ||
}) | ||
} | ||
exports.transform = function(op1, op2, side) { | ||
op1.transformAgainst(op2, ('left'==side)) | ||
exports.transform = function(ops1, ops2, side) { | ||
ops1.forEach(function(op1) { | ||
ops2.forEach(function(op2) { | ||
op1.transformAgainst(op2, ('left'==side)) | ||
}) | ||
}) | ||
} | ||
@@ -15,0 +22,0 @@ |
{ | ||
"name": "dom-ot", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Operational transform library for DOM operations (conforms to shareJS' spec)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
42342
492