We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I wonder if it's possible to have a parametric property into a file. Let me explain. Suppose into a file I have something like:
[main] str1 = "stevekx says " + $param1 + "!"
It would be nice, if I could get the str1 value, passing the value of $ param1. Something like:
var a = properties.get('main.str1', 'hello'); console.log(a) --> stevekx says hello!
The text was updated successfully, but these errors were encountered:
Have you considered using the built-in formatting in the util module? https://nodejs.org/api/util.html#util_util_format_format
util
[main] str1 = "stevekx says %s!" var format = require('util').format; console.log(format(properties.get('main.str1'), 'hello'));
Sorry, something went wrong.
Oh I did not consider it. Nice to know. For the moment I was using strformat https://github.com/fhellwig/strformat
strformat
So great to find this solution. Thx guys
No branches or pull requests
I wonder if it's possible to have a parametric property into a file.
Let me explain. Suppose into a file I have something like:
It would be nice, if I could get the str1 value, passing the value of $ param1.
Something like:
The text was updated successfully, but these errors were encountered: