diff --git a/lib/type.js b/lib/type.js index 9abd912..6454355 100644 --- a/lib/type.js +++ b/lib/type.js @@ -66,5 +66,11 @@ module.exports = { length: end - start, }); }, + + invertWithDoc: function(delta, doc) { + delta = new Delta(delta); + doc = new Delta(doc); + return delta.invert(doc); + } } };