MCPcopy
hub / github.com/webpack/webpack / canBeDecoded

Function canBeDecoded

lib/sharing/utils.js:231–239  ·  view source on GitHub ↗

* if string can be decoded * @param {string} str str to be checked * @returns {boolean} if can be decoded

(str)

Source from the content-addressed store, hash-verified

229 * @returns {boolean} if can be decoded
230 */
231function 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

Callers 1

getGitUrlVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected