MCPcopy Index your code
hub / github.com/TrySound/rollup-plugin-string / string

Function string

index.js:3–22  ·  view source on GitHub ↗
(opts = {})

Source from the content-addressed store, hash-verified

1const { createFilter } = require("rollup-pluginutils");
2
3function string(opts = {}) {
4 if (!opts.include) {
5 throw Error("include option should be specified");
6 }
7
8 const filter = createFilter(opts.include, opts.exclude);
9
10 return {
11 name: "string",
12
13 transform(code, id) {
14 if (filter(id)) {
15 return {
16 code: `export default ${JSON.stringify(code)};`,
17 map: { mappings: "" }
18 };
19 }
20 }
21 };
22}
23
24exports.string = string;

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…