forgot to add helpers
This commit is contained in:
parent
8139f83dfd
commit
a0ece5c413
3 changed files with 23 additions and 1 deletions
|
@ -44,7 +44,7 @@ let loadChanges = (backend,changes) => {
|
|||
}
|
||||
|
||||
let applyLocalChange = (backend,change) => {
|
||||
console.log("LOCAL CHANGE REQUEST",util.inspect(change,{depth:null}))
|
||||
//console.log("LOCAL CHANGE REQUEST",util.inspect(change,{depth:null}))
|
||||
return mutate(backend, (b) => b.applyLocalChange(toJS(change)));
|
||||
}
|
||||
|
||||
|
|
10
automerge-backend/TODO.md
Normal file
10
automerge-backend/TODO.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
|
||||
|
||||
### TODO
|
||||
|
||||
1. Undo
|
||||
2. Redo
|
||||
3. collapse duplicate ops in applyLocalChange
|
||||
4. a bug in tables
|
||||
5. links not fully implemented
|
||||
|
12
automerge-backend/src/helper.rs
Normal file
12
automerge-backend/src/helper.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
#[allow(clippy::trivially_copy_pass_by_ref)]
|
||||
pub(crate) fn is_false(val: &bool) -> bool {
|
||||
!val
|
||||
}
|
||||
|
||||
pub(crate) fn make_true() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
pub(crate) fn make_false() -> bool {
|
||||
false
|
||||
}
|
Loading…
Add table
Reference in a new issue