@cero-base/cero 0.8.4 → 0.8.5
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/package.json +2 -2
- package/src/index.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cero-base/cero",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "The ideal p2p API — everything is a handle, handles contain refs, refs contain rows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"test": "ls test/*.test.js | xargs -P1 -n1 brittle-node"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@cero-base/core": "^0.8.
|
|
81
|
+
"@cero-base/core": "^0.8.5",
|
|
82
82
|
"b4a": "^1.8.1",
|
|
83
83
|
"bare-abort-controller": "^1.1.2",
|
|
84
84
|
"bare-crypto": "^1.13.7",
|
package/src/index.js
CHANGED
|
@@ -179,8 +179,9 @@ Object.assign(cero, {
|
|
|
179
179
|
})
|
|
180
180
|
cero._internal = internal
|
|
181
181
|
// A bare function is shorthand for a behavior-only extension: `{ setup: fn }`.
|
|
182
|
+
// Accepts both `use(a, b)` and `use([a, b])` (and a mix) for easier composition.
|
|
182
183
|
cero.use = (...exts) =>
|
|
183
|
-
internal.extensions.push(...exts.map((e) => (typeof e === 'function' ? { setup: e } : e)))
|
|
184
|
+
internal.extensions.push(...exts.flat().map((e) => (typeof e === 'function' ? { setup: e } : e)))
|
|
184
185
|
|
|
185
186
|
async function resolveIdentity(opts, local) {
|
|
186
187
|
if (opts.identity) return opts.identity
|