share / share/sharedb

Rename destroy method?

Open
#392 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
6.5k
Forks
456
Avg merge
1d 5h
Merged PRs (30d)
5

Description

I don't know if something is wrong with my setup but calling doc.destroy() will not prevent the document from being sync'ed to other users right?

I just found out that in order to stop syncing a document I have to doc.del() which is odd to me as "destroy" sounds more "destructive" than just "del" 😆 . So I was wondering if it would be a good idea to rename it to "stop" or "clear".

On the other hand, after doc.destroy() I still see the document (now with subscribed: false). So the document is not destroyed right? What is the difference between doc.destroy() and doc.unsubscribe() after all?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the documented or implemented entry points for doc.destroy(), doc.del(), and doc.unsubscribe(), then compare their observable behavior around syncing, deletion, and subscription state. Done would require a maintainer-approved decision on the semantics and naming, with the API documentation or issue guidance updated accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.