Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: LWW-Element-Set CRDT & Tests #71

Merged
merged 10 commits into from
Jul 29, 2024

Conversation

joaopereira12
Copy link
Contributor

No description provided.

@joaopereira12 joaopereira12 changed the title Add LWW-Element-Set CRDT feat: LWW-Element-Set CRDT & Tests Jul 29, 2024
packages/crdt/src/builtins/LWWElementSet/index.ts Outdated Show resolved Hide resolved
packages/crdt/src/builtins/LWWElementSet/index.ts Outdated Show resolved Hide resolved
packages/crdt/src/builtins/LWWElementSet/index.ts Outdated Show resolved Hide resolved
packages/crdt/src/builtins/LWWElementSet/index.ts Outdated Show resolved Hide resolved
packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
const removeTimestamp = this._removes.get(element);

if (addTimestamp !== undefined) {
if (removeTimestamp === undefined || addTimestamp > removeTimestamp || (addTimestamp-removeTimestamp === 0 && this._bias === Bias.ADD)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

separate the if conditions for code readability

Copy link
Member

@d-roak d-roak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm whitespaces

packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
Copy link
Member

@d-roak d-roak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm whitespaces

packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
packages/crdt/tests/LWWElementSet.test.ts Outdated Show resolved Hide resolved
@d-roak d-roak merged commit e04bb30 into topology-foundation:main Jul 29, 2024
7 checks passed
@joaopereira12 joaopereira12 deleted the lww branch July 30, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants