Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/nodejs/node
/ truncate
Function
truncate
deps/v8/test/wasm-js/third_party/testharness.js:958–964 ·
view source on GitHub ↗
(s, len)
Source
from the content-addressed store, hash-verified
956
*
if
it was longer.
957
*/
958
function
truncate(s, len)
959
{
960
if
(s.length > len) {
961
return
s.substring(0, len - 3) +
"..."
;
962
}
963
return
s;
964
}
965
966
/*
967
* Return true
if
object is probably a Node object.
Callers
1
format_value
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected