MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / stringify

Function stringify

lib/web/CodeMirror/test/mode_test.js:104–115  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

102 }
103
104 function stringify(obj) {
105 function replacer(key, obj) {
106 if (typeof obj == "function") {
107 var m = obj.toString().match(/function\s*[^\s(]*/);
108 return m ? m[0] : "function";
109 }
110 return obj;
111 }
112 if (window.JSON && JSON.stringify)
113 return JSON.stringify(obj, replacer, 2);
114 return "[unsupported]"; // Fail safely if no native JSON.
115 }
116
117 function highlight(string, mode) {
118 var state = mode.startState();

Callers 1

highlightFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected