Skip to content

"tagValueProcessor" typescript definition and purpose #489

@andreafspeziale

Description

@andreafspeziale
  • Are you running the latest version?
  • Have you included sample input, output, error, and expected output?

Description

Shouldn't the tagValueProcessor signature be something like this?

tagValueProcessor: (tagName: string, tagValue: string, jPath: string, hasAttributes: boolean, isLeafNode: boolean) => unknown;

Instead of returning a string?

Otherwise I'm missing the point... I would use it like that

tagValueProcessor: (tagName, tagValue) => {
  switch (tagName) {
    case 'created_at':
      return new Date(tagValue)
  }

  return value;
};

Otherwise I'm missing the point of this option.

Thank you in advance!

Would you like to work on this issue?

If it's all about and simple as changing the typescript definition, why not?

  • Yes
  • No

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