* @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 Inpu
(obj, pretty)
| 1119 | * @returns {string|undefined} JSON-ified string representing `obj`. |
| 1120 | */ |
| 1121 | function toJson(obj, pretty) { |
| 1122 | if (typeof obj === 'undefined') return undefined; |
| 1123 | return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null); |
| 1124 | } |
| 1125 | |
| 1126 | |
| 1127 | /** |
no outgoing calls
no test coverage detected