Skip to content

"Attributes" not working as expected #74

Open
@clse

Description

@clse

Current default output includes type, size, and extension. It is impossible to remove these attributes, though they are cluttering the JSON since they are unnecessary for my purposes.

    const output = dirTree(
      mypath,
      {attributes: ["extension", "type", "size"]}
    );

By adding those three attributes to the call, it does the following:

  • toggles off extension from files
  • toggles off type from files
  • toggles on type for directories
  • toggles on size for directories
  • keeps size on files

This is very inconsistent behavior so I'm unsure how to proceed.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions