JSTQL-JS-Transform/output_testing/991for-of-immutable-collection.js

22 lines
No EOL
406 B
JavaScript

function Router({
title,
mapping
}) {
const array = [];
for (let [, entry] of mapping) {
[title, entry] |> array.push(%);
}
return array;
}
const routes = new Map([["about", "/about"], ["contact", "/contact"]]);
export const FIXTURE_ENTRYPOINT = {
fn: Router,
params: [],
sequentialRenders: [{
title: "Foo",
mapping: routes
}, {
title: "Bar",
mapping: routes
}]
};