MCPcopy Index your code
hub / github.com/angular-ui/ui-router / fromJson

Function fromJson

test/angular/1.4/angular.js:1282–1286  ·  view source on GitHub ↗

* @ngdoc function * @name angular.fromJson * @module ng * @kind function * * @description * Deserializes a JSON string. * * @param {string} json JSON string to deserialize. * @returns {Object|Array|string|number} Deserialized JSON string.

(json)

Source from the content-addressed store, hash-verified

1280 * @returns {Object|Array|string|number} Deserialized JSON string.
1281 */
1282function fromJson(json) {
1283 return isString(json)
1284 ? JSON.parse(json)
1285 : json;
1286}
1287
1288
1289var ALL_COLONS = /:/g;

Callers 1

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected