MCPcopy Create free account
hub / github.com/bclinkinbeard/angular / tryDecodeURIComponent

Function tryDecodeURIComponent

test/fixtures/foo.js:1191–1197  ·  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

1189 * with the decodeURIComponent function.
1190 */
1191function tryDecodeURIComponent(value) {
1192 try {
1193 return decodeURIComponent(value);
1194 } catch(e) {
1195 // Ignore any invalid uri component
1196 }
1197}
1198
1199
1200/**

Callers 1

parseKeyValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected