* if string can be decoded * @param {string} str str to be checked * @returns {boolean} if can be decoded
(str)
| 229 | * @returns {boolean} if can be decoded |
| 230 | */ |
| 231 | function canBeDecoded(str) { |
| 232 | try { |
| 233 | decodeURIComponent(str); |
| 234 | } catch (_err) { |
| 235 | return false; |
| 236 | } |
| 237 | |
| 238 | return true; |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | * get right dep version from git url |