Skip to content

Percentage Filter #84

Closed
Closed
@dderjoel

Description

@dderjoel

I was wondering if a small percentage Filter would be an useful addition:
currently, we use in our project.

export const percentFilter = (value = 0.0, decimals = 0): string => {
  return `${(value * 100).toFixed(decimals)} %`;
};

I know its just a very small addition, but it will make (at least my) code base cleaner, since I can use formatter: (v: number): string => this.$options.filters.percent(v)

feel free to make suggestions

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