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