Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/webpack/webpack
/ toSafePath
Function
toSafePath
lib/schemes/HttpUriPlugin.js:116–117 ·
view source on GitHub ↗
(str)
Source
from the content-addressed store, hash-verified
114
* @returns {string} safe path
115
*/
116
const
toSafePath = (str) =>
117
str.replace(/^[^a-z0-9]+|[^a-z0-9]+$/gi,
""
).replace(/[^a-z0-9._-]+/gi,
"_"
);
118
119
/**
120
* Returns integrity.
Callers
3
apply
Method · 0.85
_getCacheKey
Method · 0.85
apply
Method · 0.85
Calls
1
replace
Method · 0.45
Tested by
no test coverage detected