MCPcopy Index your code
hub / github.com/josdejong/mathjs / recursiveMap

Function recursiveMap

src/utils/array.js:892–903  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

890 }
891 }
892 function recursiveMap (value) {
893 if (Array.isArray(value)) {
894 const N = value.length
895 const result = Array(N)
896 for (let i = 0; i < N; i++) {
897 result[i] = recursiveMap(value[i])
898 }
899 return result
900 } else {
901 return callback(value)
902 }
903 }
904}
905
906/**

Callers 1

deepMapFunction · 0.85

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…