Echo JS 0.11.0

<~>

tracker1 comments

tracker1 1743 days ago. link 1 point
Would suggest taking a look at Steve Souders' books[1] on website performance. While they're a bit old at this point, there's a lot to gain from them.  As always, if you're really concerned about performance, write test cases for your assertions, as you may be surprised that your "optimization" does more harm than good.

As always, premature optimization is often a waste of time... optimize when you experience issues as writing more obtuse or difficult to understand code/structures will often work against you if you aren't writing apps for 100m+ user sites.

When in doubt, test.

[1] https://www.amazon.com/Steve-Souders/e/B001I9TVJS
tracker1 1745 days ago. link 1 point
You aren't doing meaningful checks or adding additional TS context, so why even bother with adding a tsconfig?  Most IDEs will apply those checks with the jsdoc alone and it isn't actually checked at runtime.
tracker1 1746 days ago. link 1 point
Tried with about 10 different websites and not getting any results.
tracker1 1746 days ago. link 0 point
You don't need to do this... JSDoc comments work without TS configured at all.  Assuming all you are really after is the code usage hint/dialog.
tracker1 1747 days ago. link 1 point
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.
tracker1 1748 days ago. link 2 points
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.
tracker1 1750 days ago. link 2 points
Edited link to point to source, which has a link in the about area.
tracker1 1753 days ago. link 1 point
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
tracker1 1753 days ago. link 2 points
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.
[more]