Skip to content

Data Format Manager #42

Description

@Zoramite

Use an application manager singleton for formatting data. Allow for ability add multiple and custom formatters.

Would have a addFormatter(formatter) that would be added to an internal array of formatters.

When formatting is needed, the last formatter added with a matching function will be used to format the value. (LIFO)

For example, can use a formatPhoneUS(value, options) call to format a phone number in the US format. This would search the formatters for a function called phoneUS and call it with the arguments provided.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions