Function
makeArrayWithValueAt
(index: number, value: unknown)
Source from the content-addressed store, hash-verified
| 18 | } |
| 19 | |
| 20 | const makeArrayWithValueAt = (index: number, value: unknown) => { |
| 21 | if (index < 0) return [] |
| 22 | |
| 23 | const arr = [] as any[] |
| 24 | for (let i = 0; i <= index; i++) { |
| 25 | arr[i] = i === index ? value : undefined |
| 26 | } |
| 27 | |
| 28 | return arr as unknown[] |
| 29 | } |
| 30 | |
| 31 | const getLiteralValue = (node: BoxNode | undefined, ctx: UnboxContext): LiteralValue | undefined => { |
| 32 | if (!node) return |
Tested by
no test coverage detected