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

Function clean

docs/app/js/sanddance-app.js:106947–106960  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106945 } else return test;
106946 },
106947 clean () {
106948 const next = {};
106949 let size = 0;
106950 for(const key8 in obj){
106951 const value = obj[key8];
106952 if (value !== NULL && (!test || !test(value))) {
106953 next[key8] = value;
106954 ++size;
106955 }
106956 }
106957 map.size = size;
106958 map.empty = 0;
106959 map.object = obj = next;
106960 }
106961 };
106962 if (input) Object.keys(input).forEach((key9)=>{
106963 map.set(key9, input[key9]);

Callers

nothing calls this directly

Calls 3

testFunction · 0.70
detachFunction · 0.70
filterMethod · 0.45

Tested by

no test coverage detected