MCPcopy
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 */
116const toSafePath = (str) =>
117 str.replace(/^[^a-z0-9]+|[^a-z0-9]+$/gi, "").replace(/[^a-z0-9._-]+/gi, "_");
118
119/**
120 * Returns integrity.

Callers 3

applyMethod · 0.85
_getCacheKeyMethod · 0.85
applyMethod · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected