Skip to content

Commit

Permalink
Export string and text patch helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
acurrieclark committed Nov 29, 2023
1 parent bc90f08 commit c15b741
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/diff-to-patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function getStringPatches(old: string, updated: string) {
return diffToStringPatches(diffChars(old, updated));
}

function diffToTextPatches(changes: Change[]): TextPatch[] {
export function diffToTextPatches(changes: Change[]): TextPatch[] {
let index = 0;
return changes.reduce((acc: TextPatch[], change) => {
if (change.removed) {
Expand Down
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
export {
diffToStringPatches,
diffToTextPatches,
getTextPatches,
getStringPatches,
} from "./diff-to-patches";
export { bindChecked } from "./actions/bind-checked";
export { bindEntityChecked } from "./actions/bind-entity-checked";
export { bindEntityIntDeferred } from "./actions/bind-entity-int-deferred";
Expand Down

0 comments on commit c15b741

Please sign in to comment.