document return type
This commit is contained in:
parent
4b08bf0e76
commit
44e4661198
1 changed files with 3 additions and 1 deletions
|
@ -57,7 +57,9 @@ export function diffDeletion(oldStr, newStr) {
|
||||||
* @param {String} oldValue the previous value
|
* @param {String} oldValue the previous value
|
||||||
* @param {String} newValue the new value
|
* @param {String} newValue the new value
|
||||||
* @param {Number} caretPosition the position of the caret after `newValue` was applied.
|
* @param {Number} caretPosition the position of the caret after `newValue` was applied.
|
||||||
* @return {object}
|
* @return {object} an object with `at` as the offset where characters were removed and/or added,
|
||||||
|
* `added` with the added string (if any), and
|
||||||
|
* `removed` with the removed string (if any)
|
||||||
*/
|
*/
|
||||||
export function diffAtCaret(oldValue, newValue, caretPosition) {
|
export function diffAtCaret(oldValue, newValue, caretPosition) {
|
||||||
const diffLen = newValue.length - oldValue.length;
|
const diffLen = newValue.length - oldValue.length;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue