MCPcopy
hub / github.com/yjs/yjs / has

Method has

src/utils/IdSet.js:199–205  ·  view source on GitHub ↗

* @param {number} client * @param {number} clock

(client, clock)

Source from the content-addressed store, hash-verified

197 * @param {number} clock
198 */
199 has (client, clock) {
200 const dr = this.clients.get(client)
201 if (dr) {
202 return findIndexInIdRanges(dr.getIds(), clock) !== null
203 }
204 return false
205 }
206
207 /**
208 * Return slices of ids that exist in this idset.

Callers 15

hasIdMethod · 0.95
toDeltaMethod · 0.45
renderAttrsFunction · 0.45
typeMapGetSnapshotFunction · 0.45
typeMapGetAllSnapshotFunction · 0.45
getDeltaMethod · 0.45
mergeIdSetsFunction · 0.45
isVisibleFunction · 0.45
diffDocsToDeltaFunction · 0.45
writeClientsStructsFunction · 0.45
readUpdateV2Function · 0.45

Calls 3

findIndexInIdRangesFunction · 0.85
getMethod · 0.45
getIdsMethod · 0.45

Tested by

no test coverage detected