MCPcopy
hub / github.com/angular-ui/ui-router / tryDecodeURIComponent

Function tryDecodeURIComponent

test/angular/1.7/angular.js:1534–1540  ·  view source on GitHub ↗

* Tries to decode the URI component without throwing an exception. * * @private * @param str value potential URI component to check. * @returns {boolean} True if `value` can be decoded * with the decodeURIComponent function.

(value)

Source from the content-addressed store, hash-verified

1532 * with the decodeURIComponent function.
1533 */
1534function tryDecodeURIComponent(value) {
1535 try {
1536 return decodeURIComponent(value);
1537 } catch (e) {
1538 // Ignore any invalid uri component.
1539 }
1540}
1541
1542
1543/**

Callers 1

parseKeyValueFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected