MCPcopy Create free account
hub / github.com/Moli-X/Resources / filter

Function filter

Script/Parser.js:3569–3572  ·  view source on GitHub ↗
(src, ...regex)

Source from the content-addressed store, hash-verified

3567/***********************************************************************************************/
3568function Tools() {
3569 const filter = (src, ...regex) => {
3570 const initial = [...Array(src.length).keys()].map(() => false);
3571 return regex.reduce((a, expr) => OR(a, src.map(item => expr.test(item))), initial)
3572 }
3573
3574 const rename = {
3575 replace: (src, old, now) => {

Callers 1

FilterScriptFunction · 0.85

Calls 1

ORFunction · 0.85

Tested by

no test coverage detected