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

Function maybeMap

out/cli.cjs:28085–28094  ·  view source on GitHub ↗
(val, fn)

Source from the content-addressed store, hash-verified

28083 return [].concat(a4, b7);
28084 };
28085 var maybeMap = function maybeMap2(val, fn) {
28086 if (isArray2(val)) {
28087 var mapped = [];
28088 for (var i3 = 0; i3 < val.length; i3 += 1) {
28089 mapped.push(fn(val[i3]));
28090 }
28091 return mapped;
28092 }
28093 return fn(val);
28094 };
28095 module2.exports = {
28096 arrayToObject: arrayToObject2,
28097 assign,

Callers

nothing calls this directly

Calls 2

isArray2Function · 0.85
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…