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

Function toJson

lib/test/angular/1.4.3/angular.js:1208–1214  ·  view source on GitHub ↗

* @ngdoc function * @name angular.toJson * @module ng * @kind function * * @description * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be * stripped since angular uses this notation internally. * * @param {Object|Array|Date|string|number} obj Inp

(obj, pretty)

Source from the content-addressed store, hash-verified

1206 * @returns {string|undefined} JSON-ified string representing `obj`.
1207 */
1208function toJson(obj, pretty) {
1209 if (typeof obj === 'undefined') return undefined;
1210 if (!isNumber(pretty)) {
1211 pretty = pretty ? 2 : null;
1212 }
1213 return JSON.stringify(obj, toJsonReplacer, pretty);
1214}
1215
1216
1217/**

Callers 4

serializeValueFunction · 0.70
$HttpProviderFunction · 0.70
stringifyFunction · 0.70
jsonFilterFunction · 0.70

Calls 1

isNumberFunction · 0.70

Tested by

no test coverage detected