Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File name should be able to be changed by the user with template variables #167

Open
Disane87 opened this issue Jul 12, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Disane87
Copy link
Owner

Currently the filename is fixed. This should be changed toi enable the user to set the filename by his needs.

@Disane87 Disane87 added the enhancement New feature or request label Jul 12, 2023
@Disane87 Disane87 self-assigned this Jul 12, 2023
@Disane87
Copy link
Owner Author

Disane87 commented Jul 12, 2023

We don't need any template library, we can achieve this by typescript only:

let stringWithVars = (str, obj) => str.replace(/\${(.*?)}/g, (x,g)=> obj[g]);

But this only applies when there is no computation or advanced formatting needed. Everything else needs a template engine like Handlebars or somethign else.

What do you think @fwartner?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant