MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / stringify

Function stringify

web/static/bower_components/angular/angular.js:10889–10904  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

10887 }
10888
10889 function stringify(value) {
10890 if (value == null) { // null || undefined
10891 return '';
10892 }
10893 switch (typeof value) {
10894 case 'string':
10895 break;
10896 case 'number':
10897 value = '' + value;
10898 break;
10899 default:
10900 value = toJson(value);
10901 }
10902
10903 return value;
10904 }
10905
10906 /**
10907 * @ngdoc service

Callers 1

Calls 1

toJsonFunction · 0.85

Tested by

no test coverage detected