promisive
v1.0.0
Published
Recursive Promise all
Downloads
13
Readme
Promisive
Recursive Promise.all
that works on object
and array
import { promisive } from "promisive";
await promisive({
a: {
b: [
Promise.resolve({
a: [{ a: Promise.resolve(1) }],
}),
Promise.resolve({
a: [{ a: Promise.resolve(2) }],
}),
],
},
});
// this will resolve to
{
"a": {
"b": [
{
"a": [
{
"a": 1
}
]
},
{
"a": [
{
"a": 2
}
]
}
]
}
}
License
MIT