Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/nwutils/nw-sample-apps
/ htmlEscape
Function
htmlEscape
mini-code-edit/cm/test/test.js:284–286 ·
view source on GitHub ↗
(str)
Source
from the content-addressed store, hash-verified
282
// Scaffolding
283
284
function
htmlEscape(str) {
285
return
str.replace(/[<&]/g,
function
(str) {
return
str ==
"&"
?
"&"
:
"<"
;});
286
}
287
function
forEach(arr, f) {
288
for
(
var
i = 0, e = arr.length; i < e; ++i) f(arr[i]);
289
}
Callers
1
runTests
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected