Skip to content

Latest commit

 

History

History
56 lines (48 loc) · 918 Bytes

README.md

File metadata and controls

56 lines (48 loc) · 918 Bytes

opfilter function

opfilter() will skip messages based on the provided Whitelist or Blacklist ops. The string representation of each operation can be found in the message/ops pkg.

configuration

opfilter({"whitelist": ["insert"]})
opfilter({"blacklist": ["delete"]})

example

messages in

{
    "op": "insert",
    {
        "_id": 0,
        "name": "transporter",
        "type": "function",
        "count": 10
    }
}
{
    "op": "delete",
    {
        "_id": 0,
        "name": "transporter",
        "type": "function",
        "count": 10
    }
}

config

opfilter({"whitelist": ["insert"]})

messages out

{
    "op": "insert",
    {
        "_id": 0,
        "name": "transporter",
        "type": "function",
        "count": 10
    }
}