Two niggles...
First: The following is TypeScript, and not the current version. While I've actually converted a lot of the projects I'm working on to TS, prefer most training examples in plain JS, also assigning the right type to the event would probably correct the any type casting.
const file = (event.srcElement as any).files[0];
...
const base64Str = btoa(reader.result as string);
Second: There's no mention of getting the correct mimetype and/or extension from the File interface.
Nice... put in a feature request for yaml/toml support... Been using yaml myself for this kind of thing for a few years now. A closer to the box linter would be nice.
I wrote config-merge for a similar use case... It merges configs/strings, and was easy enough to wire in the selected language with a component based on React Context with a useStrings component, and shimmed out a getStrings (which will get the current context outside react context, like action creators or reducers).
https://www.npmjs.com/package/@tracker1/config-merge
Yeah... for about the past 2 years, mostly been on internalized apps so stopped using most polyfils at that point. Generally only support browsers with fetch and async function support, which is everything that's seen an update since late 2017.
I agree that if I supported IE11, would probably polyfill for fetch, but at this point, I'm starting to lean towards just using ecmascript modules directly in the browser for anything public facing, which definitely excludes IE11.
Thanks for the reply... usually get a little Leary with these types of post as they're usually thinly veiled sales channels for commercial services.
I usually dig a bit deeper, guess if I'd just hit the "getting started" guide, it would be pretty self evident how it works.
Looks interresting.
I hate these kinds of posts...
I started with "Asynchronous Functions" the answer is muddied by the fact that JavaScript since 2017 has had an "async" keyword that applies to functions, which is interpreted as meaning said function returns a Promise, and supports an await keyword and possibly for-await syntax internally (2019 iirc).
I often will go through these things one by one reporting the issues with each of them, I'm not going to this time. Letting it stand, but when reading this, take it with a grain of salt, these types of writeups are often outright wrong to mis-informed to incomplete to say the least.
These types of questions should *NEVER* be asked by those that don't understand the answers. They are not appropriate for pre-screening applicants by people such as HR, recruiters or managers.