MCPcopy
hub / github.com/microsoft/SandDance / field

Function field

docs/app/js/sanddance-app.js:106575–106581  ·  view source on GitHub ↗
(field2, name, opt)

Source from the content-addressed store, hash-verified

106573 return path;
106574}
106575function field(field2, name, opt) {
106576 const path = splitAccessPath(field2);
106577 field2 = path.length === 1 ? path[0] : field2;
106578 return accessor((opt && opt.get || getter)(path), [
106579 field2
106580 ], name || field2);
106581}
106582const id = field("id");
106583const identity = accessor((_)=>_, [], "identity");
106584const zero = accessor(()=>0, [], "zero");

Callers 15

sanddance-app.jsFile · 0.70
compareFunction · 0.70
newIntervalFunction · 0.70
fFunction · 0.70
partition$1Function · 0.70
transformFunction · 0.70
set2Function · 0.70
findFunction · 0.70
stackCenterFunction · 0.70
stackNormalizeFunction · 0.70
stackZeroFunction · 0.70
partitionFunction · 0.70

Calls 3

splitAccessPathFunction · 0.70
accessorFunction · 0.70
resolveFieldFunction · 0.70

Tested by

no test coverage detected