diff --git a/src/sly.js b/src/sly.js index 1cd77a5..70a79a1 100644 --- a/src/sly.js +++ b/src/sly.js @@ -553,6 +553,17 @@ } }; + /** + * Returns current position and end position. + * + * @param {Func} callback function + * + * @return {void} + */ + self.curPos = function(callback){ + callback(self.pos.cur, self.pos.end); + } + /** * Continuous move in a specified direction. *