ModuleManager icon indicating copy to clipboard operation
ModuleManager copied to clipboard

target keys based on their value

Open Sigma88 opened this issue 8 years ago • 0 comments

I was thinking that it could be useful to have a way to target a key based on its value

let's say we have a node that looks like this:

BASKET
{
    fruit = banana
    fruit = blueberry
    fruit = lemon
}

and a patch that looks like this:

@BASKET
{
    @fruit:IS[lemon] = orange
    !fruit:IS[banana] = DEL
}

to get this output:

BASKET
{
    fruit = blueberry
    fruit = orange
}

also, having support for wildcard characters and math would be awesome, so you could do :IS[*berry] or :IS[>0] stuff like that

I could look into implement this myself, but I'm scared by MM code xD

so for now I'm putting the idea out there to see what ppl think about it

Sigma88 avatar Jul 04 '17 09:07 Sigma88