Skip to content

MapMutator clamps size range values #977

@Marcono1234

Description

@Marcono1234

MapMutator clamps the given min and max values:

this.minSize = Math.max(minSize, DEFAULT_MIN_SIZE);
this.maxSize = Math.min(maxSize, DEFAULT_MAX_SIZE);

This seems to differ from the other mutators such as ListMutator or ArrayMutator which use the given min and max values as is, and instead only perform validation using require(...).

Is it intended that MapMutator differs here in behavior? For consistency, would it make sense to use require here as well to impose restrictions (at least for the minSize)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions