How to Create Partial Functions With bind
bind pre-fills args. Partial application. No wrapper.

How to Create Partial Functions With bind
bind pre-fills args. Partial application. No wrapper.

What's wrong with this JavaScript typeof null?
What's wrong with this JavaScript typeof null returning object. The JavaScript code checks typeof before accessing properties. In JavaScript validation this lets null through and crashes on property access.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliab...

Why does this JavaScript map drop entries?
Why does this JavaScript map drop entries in production. The JavaScript code uses JSON stringify as a map key, so object key ordering changes and collisions overwrite data. In JavaScript services this corrupts caches.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascrip...

What's wrong with this JavaScript JSON parse of numbers?
What's wrong with this JavaScript JSON parse of numbers losing precision. The JavaScript code parses JSON with large integers. In JavaScript numbers over 2^53 lose precision.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #...

What's wrong with this JavaScript prototype pollution?
What's wrong with this JavaScript prototype pollution from user merge. The JavaScript code merges user input into an object. In JavaScript __proto__ or constructor can pollute all objects.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #jav...

What's wrong with this JavaScript RegExp stateful?
What's wrong with this JavaScript RegExp stateful with global flag. The JavaScript code reuses a regex with g flag. In JavaScript lastIndex persists and the next match starts from wrong position.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #...

What's wrong with this JavaScript temp file?
What's wrong with this JavaScript temp file creation in a report worker. The JavaScript code writes to a predictable path in /tmp, which can be hijacked with symlinks. In JavaScript servers this can overwrite sensitive files.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance ...

How to Use Nullish Coalesce for Real Defaults
?? only triggers on null/undefined. 0 and '' stay. || lies.

Multiple Assignment Magic: Tuple vs Array Destructuring!
Python's tuple unpacking vs JavaScript destructuring - which is more powerful? INSANE!
#javascript #python #jsvspython #destructuring #tupleunpacking #multipleassignment #arraydestructuring #viralcoding #pythontricks #javascripttricks #syntaxcomparison #mindblown

Why does this JavaScript trim not removing all whitespace?
Why does this JavaScript trim not removing all whitespace. The JavaScript code uses trim on user input. In JavaScript trim only handles space tab newline not unicode spaces.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi ...
