MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / representArray

Function representArray

src/run_tests.mjs:116–124  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

114}
115
116function representArray(val) {
117 let out = "["
118 for (let i = 0; i < val.length; ++i) {
119 if (i) out += ", "
120 out += represent(val[i])
121 if (out.length > 80) return out
122 }
123 return out + "]"
124}
125
126function representObj(val) {
127 let string = val.toString(), m, elt

Callers 1

representFunction · 0.70

Calls 1

representFunction · 0.70

Tested by

no test coverage detected