incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <...@adobe.com>
Subject Re: `instanceof` considered harmful in cordova-js
Date Fri, 27 Apr 2012 21:24:34 GMT
Alright made the changes

http://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=commit;
h=f9f51d9410e0162ee6ff4bdd7cbadbbe3464ebbc


Also added tests to make sure that subscribing to events with
non-functions fails noisily (I.e. Throws exception).



On 4/27/12 12:45 PM, "Brian LeRoux" <b@brian.io> wrote:

>+1 to that; and, as a practice, we def should be failing noisily
>rather than a silent return!
>
>On Fri, Apr 27, 2012 at 12:05 PM, Filip Maj <fil@adobe.com> wrote:
>>
>>>My vote is typeof for everything but Array and Date, and add some
>>>handy-dandy util methods isArray() and isDate() to do the checking with
>>>the
>>>toString hack().
>>
>> +1
>>


Mime
View raw message