lemmy.dexlit
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@JPDev@programming.dev to Programmer Humor@programming.dev • 1 year ago

===

programming.dev

message-square
76
fedilink
678

===

programming.dev

@JPDev@programming.dev to Programmer Humor@programming.dev • 1 year ago
message-square
76
fedilink
  • @kevincox@lemmy.ml
    link
    fedilink
    2•1 year ago

    I just tested and Terser will convert v === null || v === undefined to null==v. Personally I would prefer to read the code that explicitly shows that it is checking for both and let my minifier/optimizer worry about generating compact code.

    • @SzethFriendOfNimi@lemmy.world
      link
      fedilink
      0•1 year ago

      Try changing to const === variable. That’s most likely what’s it doing to minimize the risk of accidental assignment.

      • @kevincox@lemmy.ml
        link
        fedilink
        3•1 year ago

        Wut? This is an automated optimizer. It is not worried about accidental assignment.

        • @SzethFriendOfNimi@lemmy.world
          link
          fedilink
          1•1 year ago

          I agree it shouldn’t. But I’ve seen linters that automatically change it since they seem to be forcing practical conventions sometimes.

          • @kevincox@lemmy.ml
            link
            fedilink
            3•1 year ago

            Linters and minifers are completely different tools.

            • @SzethFriendOfNimi@lemmy.world
              link
              fedilink
              3•1 year ago

              Good point. That’s what I get for shooting from the hip.

              Thanks!

Programmer Humor@programming.dev

!programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
  • 1.5K users / day
  • 3.5K users / week
  • 8.9K users / month
  • 19.8K users / 6 months
  • 24.7K subscribers
  • 1.53K Posts
  • 54K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org