MCPcopy Create free account
hub / github.com/angular-ui/ui-router / fromJson

Function fromJson

test/angular/1.5/angular.js:1343–1347  ·  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

1341 * @returns {Object|Array|string|number} Deserialized JSON string.
1342 */
1343function fromJson(json) {
1344 return isString(json)
1345 ? JSON.parse(json)
1346 : json;
1347}
1348
1349
1350var ALL_COLONS = /:/g;

Callers 1

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected