MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / canBeJsonified

Function canBeJsonified

src/common/commontypes/Util.js:1246–1256  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

1244}
1245
1246function canBeJsonified(str) {
1247 if (typeof str !== 'string' && typeof str !== 'object') {
1248 return false;
1249 }
1250 try {
1251 const type = str.toString();
1252 return type === '[object Object]' || type === '[object Array]';
1253 } catch (err) {
1254 return false;
1255 }
1256}
1257
1258CircularUtil.setRelativeParentUtil(Util);
1259

Callers 1

paramToStringFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected