@JavaScriptBuzz

9 Followers
2 Following
205 Posts
Your daily hit of JavaScript hacks, fixes, and mind popping tricks

How to Create Partial Functions With bind

bind pre-fills args. Partial application. No wrapper.

#javascript #bind #partial #howto

https://www.youtube.com/watch?v=IqL9AAE8Qb8

How to Create Partial Functions With bind #howto

YouTube

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...

https://www.youtube.com/watch?v=ndOZFdS9LB4

Whats wrong with this JavaScript typeof null? #javascriptbackend

YouTube

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...

https://www.youtube.com/watch?v=Ff9tr-MYD5k

Why does this JavaScript map drop entries? #javascriptmapkey

YouTube

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 #...

https://www.youtube.com/watch?v=HzY-p72-XaU

Whats wrong with this JavaScript JSON parse of numbers? #javascriptapi

YouTube

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...

https://www.youtube.com/watch?v=ReBpyhpmITk

Whats wrong with this JavaScript prototype pollution? #javascriptinjection

YouTube

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 #...

https://www.youtube.com/watch?v=Fc6zoznH4uY

Whats wrong with this JavaScript RegExp stateful? #javascriptperformance

YouTube

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 ...

https://www.youtube.com/watch?v=-zgvBu_WXXU

Whats wrong with this JavaScript temp file? #javascriptdebugging

YouTube

How to Use Nullish Coalesce for Real Defaults

?? only triggers on null/undefined. 0 and '' stay. || lies.

#javascript #nullish #coalesce #defaults #howto

https://www.youtube.com/watch?v=MA8lRIqoPNk

How to Use Nullish Coalesce for Real Defaults #howto

YouTube

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

https://www.youtube.com/watch?v=k0Mhz33XGtw

Multiple Assignment Magic: Tuple vs Array Destructuring! #syntaxcomparison

YouTube

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 ...

https://www.youtube.com/watch?v=xY3yldw_8OM

Why does this JavaScript trim not removing all whitespace? #javascriptwhitespace

YouTube