MCPcopy Create free account
hub / github.com/Marcisbee/messagepipe / remove

Function remove

dev.ts:15–21  ·  view source on GitHub ↗
(value, { text, replacer = '' })

Source from the content-addressed store, hash-verified

13
14const mp2 = MessagePipe({
15 remove(value, { text, replacer = '' }) {
16 if (!text) {
17 return '';
18 }
19
20 return value.replace(text, replacer);
21 },
22})
23
24console.log(mp2.compile('Hello {planet | remove, "text":"a", replacer: "4"}!')({ planet: 'Mars' }))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected