advance-formatter
TypeScript icon, indicating that this package has built-in type declarations

0.5.3 • Public • Published

advance-formatter

Format string in a easy way.

Limitations

  1. Using character | in formatter will cause it to break unexpectedly.
  2. We cannot use many characters in formatter inside string.

Task

Basics

  1. White spaces in formatter should not matter. [x]
  2. Should have option to add bracket opening brackets {{ and closing brackets }}
  3. Systematic ways to handle undefined. [x]
  4. Format different structure like array, objects. [x]
  5. Abstract methods and object properties. [x]
  6. Use string directly into formatter. [x]
  7. Find current limitations.
  8. Add proper test cases.
  9. Npm package [x]
  10. Appropriate Examples

Good to have

  1. Tag system
    1. Add option for tags to group pipelines and data.
    2. Tags will have priority
    3. Tags will option to activate or deactivate
  2. Cloning formatter
  3. Add strict mode.

Advance

  1. Conditionals pipe. [x]
    1. Discuss on what is treated as present in conditionals value, i.e. pipe ternary
  2. Save result of an operation and reuse it.
  3. Easy way to easily compose multiple pipes.
  4. Functional programming approach.

Discussion around

  1. Handle singular and plural forms of words. [x]
  2. Default values. [x]
    1. Discuss on what is treated as present in default value, i.e. pipe present
  3. Send parameter to pipe. [x]
  4. How to send named parameter in pipes?
  5. Way to work it with react.
    1. How to make certain part of text bold?
    2. How to add line break somewhere?
  6. Should number be part of value. Ideally it should be non-empty-string | "" | undefined
  7. How to prase text in formatter which have character of | in it?

Package Sidebar

Install

npm i advance-formatter

Weekly Downloads

1

Version

0.5.3

License

MIT

Unpacked Size

40.5 kB

Total Files

19

Last publish

Collaborators

  • amitdigga