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

Function paramToString

src/common/commontypes/Util.js:1232–1244  ·  view source on GitHub ↗
(param)

Source from the content-addressed store, hash-verified

1230INCHES_PER_UNIT['yard'] = INCHES_PER_UNIT.yd;
1231
1232function paramToString(param) {
1233 if (param == undefined || param == null) {
1234 return '';
1235 }
1236 if (param instanceof Date) {
1237 return param.toJSON();
1238 }
1239 if (canBeJsonified(param)) {
1240 return JSON.stringify(param);
1241 }
1242
1243 return param.toString();
1244}
1245
1246function canBeJsonified(str) {
1247 if (typeof str !== 'string' && typeof str !== 'object') {

Callers 1

Util.jsFile · 0.85

Calls 3

canBeJsonifiedFunction · 0.85
toJSONMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected