MCPcopy
hub / github.com/webpack/webpack / requestToId

Function requestToId

lib/ids/IdHelpers.js:62–63  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

60 * @returns {string} id representation
61 */
62const requestToId = (request) =>
63 request.replace(/^(\.\.?\/)+/, "").replace(/(^[.-]|[^a-z0-9_-])+/gi, "_");
64
65/**
66 * Shorten long string.

Callers 3

getKeyMethod · 0.85
getShortChunkNameFunction · 0.85
getLongChunkNameFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected