MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / stringify

Function stringify

lib/test/angular/1.8.0/angular.js:2209–2228  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

2207}
2208
2209function stringify(value) {
2210 if (value == null) { // null || undefined
2211 return '';
2212 }
2213 switch (typeof value) {
2214 case 'string':
2215 break;
2216 case 'number':
2217 value = '' + value;
2218 break;
2219 default:
2220 if (hasCustomToString(value) && !isArray(value) && !isDate(value)) {
2221 value = value.toString();
2222 } else {
2223 value = toJson(value);
2224 }
2225 }
2226
2227 return value;
2228}
2229
2230var NODE_TYPE_ELEMENT = 1;
2231var NODE_TYPE_ATTRIBUTE = 2;

Callers 2

angular.jsFile · 0.70

Calls 4

hasCustomToStringFunction · 0.70
isArrayFunction · 0.70
isDateFunction · 0.70
toJsonFunction · 0.70

Tested by

no test coverage detected