MCPcopy Index your code
hub / github.com/microsoft/SandDance / formatArrayValue

Function formatArrayValue

docs/tests/v2/es6/js/sanddance.js:827–844  ·  view source on GitHub ↗
(v, opts)

Source from the content-addressed store, hash-verified

825}
826
827function formatArrayValue(v, opts) {
828 var _opts$maxElts = opts.maxElts,
829 maxElts = _opts$maxElts === void 0 ? 16 : _opts$maxElts,
830 _opts$size = opts.size,
831 size = _opts$size === void 0 ? 1 : _opts$size;
832 var string = '[';
833
834 for (var i = 0; i < v.length && i < maxElts; ++i) {
835 if (i > 0) {
836 string += ",".concat(i % size === 0 ? ' ' : '');
837 }
838
839 string += formatValue(v[i], opts);
840 }
841
842 var terminator = v.length > maxElts ? '...' : ']';
843 return "".concat(string).concat(terminator);
844}
845
846function formatImage(image, message, scale) {
847 var maxWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 600;

Callers 1

formatValueFunction · 0.70

Calls 1

formatValueFunction · 0.70

Tested by

no test coverage detected