27 lines
403 B
JavaScript
27 lines
403 B
JavaScript
|
import { identity } from "shared-runtime";
|
||
|
function Component({
|
||
|
data
|
||
|
}) {
|
||
|
let x = 0;
|
||
|
for (const item of data) {
|
||
|
const {
|
||
|
current,
|
||
|
other
|
||
|
} = item;
|
||
|
x += current;
|
||
|
other |> identity(%);
|
||
|
}
|
||
|
return [x];
|
||
|
}
|
||
|
export const FIXTURE_ENTRYPOINT = {
|
||
|
fn: Component,
|
||
|
params: [{
|
||
|
data: [{
|
||
|
current: 2,
|
||
|
other: 3
|
||
|
}, {
|
||
|
current: 4,
|
||
|
other: 5
|
||
|
}]
|
||
|
}]
|
||
|
};
|