Skip to content

Put config as argument to modifiers #9

@likerRr

Description

@likerRr

config shouldn't be modified on the fly.

Add method like provideConfig(modifierType, modifierFn, config) to apply new config. It needs in order to prevent partial config change during modifier runtime and also to prevent unexpected situations with changing config object by reference.

Modifier must be a function which accepts config parameter and should return a function which accepts level and parts

const config = Object.assign({}, modifierFn.defaults, modifierConfig);
modifiers.set(modifierFn, modifierFn(config, debug));

debug - true/false if debug is enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions