Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

undefined #62

Open
ghost opened this issue Oct 7, 2013 · 0 comments
Open

undefined #62

ghost opened this issue Oct 7, 2013 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 7, 2013

can you support undefined constant for function argument?
when I use

function($foo=null){}

you convert it to

function(foo){
    if(typeof foo=== "undefined"){
        foo=null;
    }
}

can you do this?

define('undefined'=null);//defined somewhere

function($foo=undefined){}

convert to

function(foo){}

just for optimalization. sometime I use some like this in js

function testFoo(foo){
    if(typeof foo=== "undefined"){ // this not need be here
        foo=null;
    }
    if (!foo){
        //I do some here
    }
}
testFoo();
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants