Echo JS 0.11.0

<~>

tracker1 comments

tracker1 2077 days ago. link 1 point
Just curious if anyone finds these types of basic level tutorials useful?  I mean, generics are probably a core feature in using TypeScript in the first place.  There's also a lot of posts that are pretty intro js or node as well.  Curious what opinions are.
tracker1 2077 days ago. link 1 point
I'd suggest posting on stack overflow.

That said..

    const checks = Array.from(
      document.querySelectorAll('input[name^=newpackqty]')
    );
    const noSrcLabels = !checks.find(el => ~~el.value);

the first one gets all inputs with a name that starts with newpackqty, and the second checks to find if one has a numeric value that is not 0, and inverts the rsult (!).
tracker1 2078 days ago. link 1 point
The blacklist isn't really much worse than the whitelist depending on the database... though if you're using a distributed/redundant db, such as Cassandra/Scylla, BigTable, Dynamo or Storage Tables, then a whitelist can be opportunistic.

If you're using a structured (SQL) database, either white or blacklist should work roughly equally.
tracker1 2079 days ago. link 1 point
While this does show how you *could* use linked lists in JavaScript, in practice, don't do this... just use JS Arrays with plain objects.  The overhead for the article's methods will generally take a lot more memory and not really perform better than Array.prototype methods already available.
tracker1 2086 days ago. link 2 points
Should followup with generators (iterable by default), async generators (for-await syntax).
tracker1 2089 days ago. link 2 points
This is probably more appropriate of a question for stackoverflow.com
tracker1 2090 days ago. link 1 point
I believe Promise.all and Promise.race have been around since ES6/ES2015 or ES2016.
tracker1 2092 days ago. link 2 points
Decent primer on iterables.  As I was reading, was getting ready to make a comment about generators and async generators, but it's noted in the last paragraph.  Look forwar to the next/related article.
tracker1 2094 days ago. link 1 point
Arrays and Objects in JS are not quite 1:1 as the memory structures for lower-level languages.  Arrays are more like enhanced objects, with more indexes.  Objects are also a bit more than just a hash table, it's just he easiest way to think about it.
[more]