MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / mapDefined

Function mapDefined

out/cli.cjs:33321–33333  ·  view source on GitHub ↗
(inp, mapper)

Source from the content-addressed store, hash-verified

33319 }
33320 }
33321 function mapDefined(inp, mapper) {
33322 return inp.reduce((acc, v5) => {
33323 if (v5 === void 0) {
33324 return acc;
33325 }
33326 const m5 = mapper(v5);
33327 if (m5 === void 0) {
33328 return acc;
33329 }
33330 acc.push(m5);
33331 return acc;
33332 }, []);
33333 }
33334 function mapDefinedEntries(inp, mapper) {
33335 const acc = [];
33336 for (const [k7, v5] of inp) {

Callers 5

encodeMatrixFunction · 0.85
encodeLabelFunction · 0.85
formEncoderFunction · 0.85
encodeDeepObjectObjectFunction · 0.85
encodeSimpleFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…