You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is quite neat as you could also do something like asIntRecord etc. And it's quite flexible as you can set the delimiter to say newline for records.
The text was updated successfully, but these errors were encountered:
hongkongkiwi
changed the title
asStringRecord(recordDelimiter: string = ",", itemSeperator: string = "=")
Add .asStringRecord
Nov 1, 2024
It would be great to have a feature which produces a Record<string, string> from a set of strings.
For example if I have an environment variable like this:
"a=1,b=2,c=3" or string quoted ""a"="1","b"="2""
Right now, I can do it with this code:
Or to handle the string quoted case:
It would be super awesome if I could just have a asStringRecord(",", "="), then the code would be much cleaner.
So the proposal is to add:
This is quite neat as you could also do something like asIntRecord etc. And it's quite flexible as you can set the delimiter to say newline for records.
The text was updated successfully, but these errors were encountered: