MCPcopy Index your code
hub / github.com/Va1/string-replace-loader / loader

Function loader

lib/loader.js:6–17  ·  view source on GitHub ↗
(source, map)

Source from the content-addressed store, hash-verified

4const loaderName = 'string-replace-loader'
5
6function loader (source, map) {
7 this.cacheable()
8
9 const optionsArr = getOptionsArr(loaderName, this)
10
11 let newSource = source
12 for (const options of optionsArr) {
13 newSource = replace(newSource, options, this)
14 }
15
16 this.callback(null, newSource, map)
17}
18
19module.exports = loader

Callers

nothing calls this directly

Calls 2

getOptionsArrFunction · 0.85
replaceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…