Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { testMutateSemantics } from "https://esm.town/v/stevekrouse/testMutateSemantics";
export const unauthenticatedCantMutateViaObjectSneak =
testMutateSemantics({
stateName: "@stevekrouse.testState",
api: "localhost:3001",
expected: (old, next) => next.n2 !== next.n,
mutator: (now) => `(() => {
let d = {n: ${now}};
@stevekrouse.mutateTestState(d);
d.n2 = ${now}
})()`,
authenticated: false,
});
October 23, 2023