fx 32.0.0 → 34.0.0
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/index.js +8 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -233,6 +233,14 @@ async function run(json, code) {
|
|
|
233
233
|
if (typeof x === 'object' && x !== null) return Object.values(x)
|
|
234
234
|
throw new Error(`Cannot get values of ${typeof x}`)
|
|
235
235
|
}
|
|
236
|
+
|
|
237
|
+
function list(x) {
|
|
238
|
+
if (Array.isArray(x)) {
|
|
239
|
+
for (const y of x) console.log(y)
|
|
240
|
+
return skip
|
|
241
|
+
}
|
|
242
|
+
throw new Error(`Cannot list ${typeof x}`)
|
|
243
|
+
}
|
|
236
244
|
}
|
|
237
245
|
|
|
238
246
|
async function read(fd = 0) {
|