MCPcopy Create free account
hub / github.com/microsoft/SandDance / getN

Function getN

docs/app/js/sanddance-app.js:106518–106524  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

106516 return obj[field1];
106517 };
106518const getN = (path)=>{
106519 const len = path.length;
106520 return function(obj) {
106521 for(let i = 0; i < len; ++i)obj = obj[path[i]];
106522 return obj;
106523 };
106524};
106525function error(message) {
106526 throw Error(message);
106527}

Callers 1

getterFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected