import * as P from "flurp/pojo";const setX = P.set("x", 5);setX({x: 3}); // {x: 5}setX({y: 3}); // {x: 5, y: 3}const setXIfExists = P.set("x", 5, false);setXIfExists({y: 3}); // {y: 3}
Example