todotxt4js
    Preparing search index...

    Interface ParserOptions

    Configuration options for the parser.

    interface ParserOptions {
        customKeyHandlers?: KeyHandler[];
        duplicateKeyBehavior?: "error" | "overwrite" | "merge";
    }
    Index

    Properties

    customKeyHandlers?: KeyHandler[]

    Array of custom handlers for specific keys

    duplicateKeyBehavior?: "error" | "overwrite" | "merge"

    How to handle duplicate keys:

    • "error": throw an error on duplicate key
    • "overwrite": replace the previous value
    • "merge": store duplicate values in an array