1.0.5 • Published 3 years ago

@mroc/ottype-basic-string v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

ottype-basic-string

This proof-of-concept implementation of a operational transformation (OT) type text is not meant to be used in production and just serves the authors desire to gain domain knowledge.

The API supports two operations: Insert and delete a single char in a text.

const type = require("@mroc/ottype-basic-string");

const state0 = "ABC";

const op0 = type.opInsert(1, "x");
const state1 = type.apply(state0, op0);
console.log(state1); // "AxBC";

const op1 = type.opDelete(1);
const state2 = type.apply(state1, op1);
console.log(state1); // "ABC";
1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago