lib0 0.2.97 → 0.2.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -12
- package/bin/0serve.js +2 -1
- package/coverage/tmp/coverage-165735-1727438709799-0.json +1 -0
- package/dist/{broadcastchannel-d8dd8179.cjs → broadcastchannel-a4555c37.cjs} +2 -2
- package/dist/{broadcastchannel-d8dd8179.cjs.map → broadcastchannel-a4555c37.cjs.map} +1 -1
- package/dist/broadcastchannel.cjs +5 -5
- package/dist/{buffer-bb79ab9e.cjs → buffer-6e426aed.cjs} +2 -2
- package/dist/{buffer-bb79ab9e.cjs.map → buffer-6e426aed.cjs.map} +1 -1
- package/dist/buffer.cjs +4 -4
- package/dist/cache.cjs +2 -2
- package/dist/component.cjs +3 -3
- package/dist/{diff-d650b53e.cjs → diff-2825aafb.cjs} +2 -2
- package/dist/{diff-d650b53e.cjs.map → diff-2825aafb.cjs.map} +1 -1
- package/dist/diff.cjs +3 -3
- package/dist/{environment-61ee28d4.cjs → environment-95824d14.cjs} +3 -3
- package/dist/environment-95824d14.cjs.map +1 -0
- package/dist/environment.cjs +3 -3
- package/dist/{function-982ea0fa.cjs → function-932685da.cjs} +2 -2
- package/dist/{function-982ea0fa.cjs.map → function-932685da.cjs.map} +1 -1
- package/dist/function.cjs +2 -2
- package/dist/index.cjs +7 -7
- package/dist/indexeddbV2.cjs +1 -1
- package/dist/jwt.cjs +4 -4
- package/dist/list.cjs +2 -2
- package/dist/logging.cjs +3 -3
- package/dist/logging.common.cjs +3 -3
- package/dist/logging.node.cjs +3 -3
- package/dist/{object-b0539a4e.cjs → object-062fb341.cjs} +30 -2
- package/dist/object-062fb341.cjs.map +1 -0
- package/dist/object.cjs +3 -1
- package/dist/object.cjs.map +1 -1
- package/dist/object.d.ts +12 -0
- package/dist/object.d.ts.map +1 -1
- package/dist/object.test.d.ts +1 -0
- package/dist/object.test.d.ts.map +1 -1
- package/dist/performance.node.cjs +2 -2
- package/dist/pledge.cjs +1 -1
- package/dist/{prng-b42ec6bb.cjs → prng-ffbde921.cjs} +2 -2
- package/dist/{prng-b42ec6bb.cjs.map → prng-ffbde921.cjs.map} +1 -1
- package/dist/prng.cjs +5 -5
- package/dist/rabin-gf2-polynomial.cjs +4 -4
- package/dist/rabin-uncached.cjs +4 -4
- package/dist/rabin.cjs +4 -4
- package/dist/testing.cjs +6 -6
- package/dist/url.cjs +1 -1
- package/environment.js +1 -1
- package/object.d.ts +12 -0
- package/object.d.ts.map +1 -1
- package/object.js +24 -0
- package/object.test.d.ts +1 -0
- package/object.test.d.ts.map +1 -1
- package/package.json +1 -1
- package/coverage/tmp/coverage-24110-1723453655866-0.json +0 -1
- package/dist/environment-61ee28d4.cjs.map +0 -1
- package/dist/object-b0539a4e.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -712,19 +712,19 @@ In practice, when decoding several million small strings, the GC will kick in mo
|
|
|
712
712
|
<b><code>encoding.RleIntDiffEncoder#bufs: Array<Uint8Array></code></b><br>
|
|
713
713
|
</dl>
|
|
714
714
|
</details>
|
|
715
|
-
<details><summary><b>[lib0/
|
|
716
|
-
<pre>import * as
|
|
715
|
+
<details><summary><b>[lib0/environment]</b> Isomorphic module to work access the environment (query params, env variables).</summary>
|
|
716
|
+
<pre>import * as env from 'lib0/environment'</pre>
|
|
717
717
|
<dl>
|
|
718
|
-
<b><code>
|
|
719
|
-
<b><code>
|
|
720
|
-
<b><code>
|
|
721
|
-
<b><code>
|
|
722
|
-
<b><code>
|
|
723
|
-
<b><code>
|
|
724
|
-
<b><code>
|
|
725
|
-
<b><code>
|
|
726
|
-
<b><code>
|
|
727
|
-
<b><code>
|
|
718
|
+
<b><code>env.isNode</code></b><br>
|
|
719
|
+
<b><code>env.isBrowser</code></b><br>
|
|
720
|
+
<b><code>env.isMac</code></b><br>
|
|
721
|
+
<b><code>env.hasParam</code></b><br>
|
|
722
|
+
<b><code>env.getParam</code></b><br>
|
|
723
|
+
<b><code>env.getVariable</code></b><br>
|
|
724
|
+
<b><code>env.getConf(name: string): string|null</code></b><br>
|
|
725
|
+
<b><code>env.hasConf</code></b><br>
|
|
726
|
+
<b><code>env.production</code></b><br>
|
|
727
|
+
<b><code>env.supportsColor</code></b><br>
|
|
728
728
|
</dl>
|
|
729
729
|
</details>
|
|
730
730
|
<details><summary><b>[lib0/error]</b> Error helpers.</summary>
|
|
@@ -1390,10 +1390,27 @@ export const testMyFirstTest = tc => {
|
|
|
1390
1390
|
|
|
1391
1391
|
### React-Native support
|
|
1392
1392
|
|
|
1393
|
+
React-native apps should be able to use lib0. You need to install a polyfill for
|
|
1394
|
+
webcrypto and enable package-exports support in react-native:
|
|
1395
|
+
|
|
1393
1396
|
```sh
|
|
1397
|
+
# install polyfill
|
|
1394
1398
|
npm i isomorphic-webcrypto
|
|
1395
1399
|
```
|
|
1396
1400
|
|
|
1401
|
+
Add this to `metro.config.js` [(see docs)](https://reactnative.dev/blog/2023/06/21/package-exports-support):
|
|
1402
|
+
|
|
1403
|
+
```js
|
|
1404
|
+
const config = {
|
|
1405
|
+
// ...
|
|
1406
|
+
resolver: {
|
|
1407
|
+
unstable_enablePackageExports: true
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
```
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
|
|
1397
1414
|
### License
|
|
1398
1415
|
|
|
1399
1416
|
[The MIT License](./LICENSE) © Kevin Jahns
|
package/bin/0serve.js
CHANGED