Skip to content

ProtonMail/sieve.js

Repository files navigation

CircleCI

Sieve.js

JavaScript library to wrap sieve configuration

Simple representation

{
    Operator: {
        label: '',
        value: 'AllOf' // 'AnyOf'
    },
    Conditions: [
        {
            Comparator: {
                value: 'contains' // 'is', 'matches', 'starts', 'ends'
            },
            Values: ['[email protected]']
        }
    ],
    Actions: {
        FileInto: ['trash'],
        Mark: {
            Read: false,
            Starred: false
        },
        Vacation: 'Not here for few days'
    }
}

Test

npm test