lib0 icon indicating copy to clipboard operation
lib0 copied to clipboard

Monorepo of isomorphic utility functions

Results 13 lib0 issues
Sort by recently updated
recently updated
newest added

Don't the 32 bit writers use four bytes?

Same as https://github.com/yjs/y-protocols/pull/21

Could we remove `standard` completely? The only rule that I can't get around is the space in classes, rest seems fine.. There was also an inconsistency with arrowParens, not sure...

I found that the statement `data instanceof Array` in [encoding.js](https://github.com/dmonad/lib0/blob/8eb3ba3e2615260225cd36bd56bb011cc6893f1a/encoding.js#L476) is incorrect when checking arrays across iframe, which expected to be true. Maybe `Array.isArray` is preferred? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#instanceof_vs_isarray

Fixes bug where calling `myObservable.emit('some-event')` (with no 2nd argument) throws a "TypeError: args is not iterable (cannot read property undefined)" error.

Putting this up as an (untested) fix for #42. This isn't duck-typing but, instead, enforces the known array length. Has the additional benefit of catching other cases where the same...

**Describe the bug** When running tests for Yjs with `react-scripts test`, import of `lib0/webcrypto` inside `lib0/dist/random.cjs` causes test failure with "SyntaxError: Unexpected token 'export'". ```bash FAIL src/yjs.test.js ● Test suite...

bug

**Describe the bug** A clear and concise description of what the bug is. `Observable.once` creates a wrapper around the function, so calling `Observable.off` does not prevent it from being called....

bug

**Describe the bug** The `ObservableV2` class allows the specification of a type which defines the set of events and callbacks, but the template is overly permissive. Namely, the `EVENT` parameter...

bug