Skip to content

Instantly share code, notes, and snippets.

@redradist
Created September 12, 2021 12:28
Show Gist options
  • Select an option

  • Save redradist/15f03dfb1d17ae974b7123fe3950bed2 to your computer and use it in GitHub Desktop.

Select an option

Save redradist/15f03dfb1d17ae974b7123fe3950bed2 to your computer and use it in GitHub Desktop.

Revisions

  1. redradist created this gist Sep 12, 2021.
    22 changes: 22 additions & 0 deletions babel_safescript_transformer.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    const str0 = "3124122";
    const num0 = 9;
    const str1 = "3124122";
    const num1 = str1 - num0;
    const num2 = 55 + num1;
    const num3 = 5 + num0;
    const num4 = (num3 + 1) + 8;
    let num5 = 3;
    num5 += "3";

    let str2 = "24256";
    let numstr2 = +str2;

    ++numstr2;

    function something(num) {
    if (typeof num === "number") {
    return num + 88;
    }
    return num + 88;
    }
    something(2);