MCPcopy
hub / github.com/webpack/webpack / getAfter

Function getAfter

lib/ModuleFilenameHelpers.js:59–63  ·  view source on GitHub ↗
(strFn, token)

Source from the content-addressed store, hash-verified

57 * @returns {ReturnStringCallback} a function that returns the part of the string after the token
58 */
59const getAfter = (strFn, token) => () => {
60 const str = strFn();
61 const idx = str.indexOf(token);
62 return idx < 0 ? "" : str.slice(idx);
63};
64
65/**
66 * Returns a function that returns the part of the string before the token

Callers 1

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected