- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 33.8k
 
Closed
Description
What problem does this feature solve?
It will allow to create custom methods(filters) for text interpolation.
Declare those methods as Actions, for example, in vuex and map them app-wide.
Thus, there would be no need in importing libraries.
What does the proposed API look like?
For example, a developer could simply add the following function as a method:
numberWithCommas(x) {
    return x.toString().replace(/\B(?=(\d{3}) (?!\d))/g, ",");
}
And then, inside the mustache syntax do the following:
{{ number.numberWithCommas }}
That would call the function and return a formatted number.
Metadata
Metadata
Assignees
Labels
No labels