<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Unscriptable.com</title>
	<atom:link href="http://unscriptable.com/index.php/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://unscriptable.com</link>
	<description>Nothing is impossible.  Even on the Web.</description>
	<lastBuildDate>Mon, 28 Jun 2010 22:12:59 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on It&#8217;s official: the Cujo Project is underway by Naeem</title>
		<link>http://unscriptable.com/index.php/2010/06/09/its-official-the-cujo-project-is-underway/comment-page-1/#comment-1123</link>
		<dc:creator>Naeem</dc:creator>
		<pubDate>Mon, 28 Jun 2010 22:12:59 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=611#comment-1123</guid>
		<description>Hey John, 
Really liked your Cujo project, saw presentation. Can&#039;t wait for its release.</description>
		<content:encoded><![CDATA[<p>Hey John,<br />
Really liked your Cujo project, saw presentation. Can&#8217;t wait for its release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on It&#8217;s official: the Cujo Project is underway by Tweets that mention It’s official: the Cujo Project is underway &#124; Unscriptable.com -- Topsy.com</title>
		<link>http://unscriptable.com/index.php/2010/06/09/its-official-the-cujo-project-is-underway/comment-page-1/#comment-1117</link>
		<dc:creator>Tweets that mention It’s official: the Cujo Project is underway &#124; Unscriptable.com -- Topsy.com</dc:creator>
		<pubDate>Thu, 10 Jun 2010 02:05:25 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=611#comment-1117</guid>
		<description>[...] This post was mentioned on Twitter by John Hann, Brian Cavalier. Brian Cavalier said: RT @unscriptable: It’s official: the Cujo Project is underway. http://bit.ly/cujointro #cujojs [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by John Hann, Brian Cavalier. Brian Cavalier said: RT @unscriptable: It’s official: the Cujo Project is underway. <a href="http://bit.ly/cujointro" rel="nofollow">http://bit.ly/cujointro</a> #cujojs [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Better Javascript Memoizer by A Better Javascript Un-memoizer. Part 1: Epic FAIL! &#124; Unscriptable.com</title>
		<link>http://unscriptable.com/index.php/2009/05/01/a-better-javascript-memoizer/comment-page-1/#comment-1100</link>
		<dc:creator>A Better Javascript Un-memoizer. Part 1: Epic FAIL! &#124; Unscriptable.com</dc:creator>
		<pubDate>Wed, 28 Apr 2010 20:41:04 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=272#comment-1100</guid>
		<description>[...] my previous post, A Better Javascript Memoizer, some of you left some great feedback. (Thanks to all of you!) I think it&#8217;s because each of [...]</description>
		<content:encoded><![CDATA[<p>[...] my previous post, A Better Javascript Memoizer, some of you left some great feedback. (Thanks to all of you!) I think it&#8217;s because each of [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Debouncing Javascript Methods by rolfen</title>
		<link>http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/comment-page-1/#comment-1056</link>
		<dc:creator>rolfen</dc:creator>
		<pubDate>Tue, 20 Apr 2010 23:34:09 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=7#comment-1056</guid>
		<description>&lt;a href=&quot;#comment-448&quot; rel=&quot;nofollow&quot;&gt;@h3&lt;/a&gt; 
That&#039;s not really bounce, but more like threshold. I you press a key less then 15ms and it doesnt register the keypress then it&#039;s a threshold problem, or whatever they call it. Bounce refers to multiple contiguous events reduced to a same event. Your problem is one (or more) event(s) reduced to zero events :)
IMHO!</description>
		<content:encoded><![CDATA[<p><a href="#comment-448" rel="nofollow">@h3</a><br />
That&#8217;s not really bounce, but more like threshold. I you press a key less then 15ms and it doesnt register the keypress then it&#8217;s a threshold problem, or whatever they call it. Bounce refers to multiple contiguous events reduced to a same event. Your problem is one (or more) event(s) reduced to zero events <img src='http://unscriptable.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
IMHO!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JSLint puked on my javascript! by John H</title>
		<link>http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/comment-page-1/#comment-1040</link>
		<dc:creator>John H</dc:creator>
		<pubDate>Tue, 13 Apr 2010 11:52:43 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=568#comment-1040</guid>
		<description>Hey James,

Heh, the old Netscape specs are kinda &lt;em&gt;loose&lt;/em&gt;.  In a recent &lt;a href=&quot;http://webreflection.blogspot.com/2010/02/arguments-callee-call-and-apply.html&quot; rel=&quot;nofollow&quot;&gt;blog post&lt;/a&gt;, Andrea Giammarchi reminded me that &lt;code&gt;if (x == null)&lt;/code&gt; is the same as writing &lt;code&gt;if (x == null &#124;&#124; x == undefined)&lt;/code&gt; (and also removes your responsibility of ensuring that undefined is really undefined.)  Once in a while I&#039;ll use that if I don&#039;t care about whether the next developer understands Javascript&#039;s many coercion nuances.  

You&#039;re certainly right about just using &lt;code&gt;if (obj)&lt;/code&gt; some times.  If the docmentation clearly states that we&#039;re expecting an object for a parameter (or something else that won&#039;t coerce ambiguously), I&#039;ll use that.  Until ES5, it&#039;s by far the fastest and lightest way to detect missing args -- and, imho, the easiest to read. :)</description>
		<content:encoded><![CDATA[<p>Hey James,</p>
<p>Heh, the old Netscape specs are kinda <em>loose</em>.  In a recent <a href="http://webreflection.blogspot.com/2010/02/arguments-callee-call-and-apply.html" rel="nofollow">blog post</a>, Andrea Giammarchi reminded me that <code>if (x == null)</code> is the same as writing <code>if (x == null || x == undefined)</code> (and also removes your responsibility of ensuring that undefined is really undefined.)  Once in a while I&#8217;ll use that if I don&#8217;t care about whether the next developer understands Javascript&#8217;s many coercion nuances.  </p>
<p>You&#8217;re certainly right about just using <code>if (obj)</code> some times.  If the docmentation clearly states that we&#8217;re expecting an object for a parameter (or something else that won&#8217;t coerce ambiguously), I&#8217;ll use that.  Until ES5, it&#8217;s by far the fastest and lightest way to detect missing args &#8212; and, imho, the easiest to read. <img src='http://unscriptable.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JSLint puked on my javascript! by John H</title>
		<link>http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/comment-page-1/#comment-1039</link>
		<dc:creator>John H</dc:creator>
		<pubDate>Tue, 13 Apr 2010 11:41:51 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=568#comment-1039</guid>
		<description>Ok, so like 95% of the world insists on braces.  Sheesh.  (Including at least one minifier -- although I haven&#039;t encountered it.) 

So now I&#039;m trying to use braces for one-liners.  Maybe I&#039;ll get used to it.  

&lt;em&gt;Eventually.&lt;/em&gt;  :P

(@Pankaj, yah, I found the bug the old-fashioned way: alert() statements!)</description>
		<content:encoded><![CDATA[<p>Ok, so like 95% of the world insists on braces.  Sheesh.  (Including at least one minifier &#8212; although I haven&#8217;t encountered it.) </p>
<p>So now I&#8217;m trying to use braces for one-liners.  Maybe I&#8217;ll get used to it.  </p>
<p><em>Eventually.</em>  <img src='http://unscriptable.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>(@Pankaj, yah, I found the bug the old-fashioned way: alert() statements!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JSLint puked on my javascript! by Pankaj</title>
		<link>http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/comment-page-1/#comment-1037</link>
		<dc:creator>Pankaj</dc:creator>
		<pubDate>Mon, 12 Apr 2010 14:58:13 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=568#comment-1037</guid>
		<description>Hey John, Nice post.
You might have observed during the time we interacted - I too write my code with braces, whenever possible. I still feel it is easier to read code that way.
BTW, you did nail the IE-only bug right?</description>
		<content:encoded><![CDATA[<p>Hey John, Nice post.<br />
You might have observed during the time we interacted &#8211; I too write my code with braces, whenever possible. I still feel it is easier to read code that way.<br />
BTW, you did nail the IE-only bug right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JSLint puked on my javascript! by Jordan</title>
		<link>http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/comment-page-1/#comment-1007</link>
		<dc:creator>Jordan</dc:creator>
		<pubDate>Wed, 07 Apr 2010 16:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=568#comment-1007</guid>
		<description>When you intend to do that things that JSLint thinks are wrong, you can indicate it in the code and the tool will not warn you:

var test = 0;
/*jslint: eqeqeq: false */
if (test == false) { /*jslint: eqeqeq: true */
  doStuff();
}
/*jslint plusplus: false */
for (test = 0; test &lt; 5; ++test) { /*jslint plusplus: true */
  doMoreStuff()
}

Of course, there doesn&#039;t seem to be an option to allow == null - since null and undefined are distinct values, &quot;typeof(test) === &#039;undefined&#039; &#124;&#124; test === null&quot; indicates to the next programmer (with fewer bytes than a comment) that you know precisely what your variable should contain.

Definitely agree with #3 - if you post your issue on http://tech.groups.yahoo.com/group/jslint_com/ Douglas usually responds very quickly.</description>
		<content:encoded><![CDATA[<p>When you intend to do that things that JSLint thinks are wrong, you can indicate it in the code and the tool will not warn you:</p>
<p>var test = 0;<br />
/*jslint: eqeqeq: false */<br />
if (test == false) { /*jslint: eqeqeq: true */<br />
  doStuff();<br />
}<br />
/*jslint plusplus: false */<br />
for (test = 0; test &lt; 5; ++test) { /*jslint plusplus: true */<br />
  doMoreStuff()<br />
}</p>
<p>Of course, there doesn&#039;t seem to be an option to allow == null &#8211; since null and undefined are distinct values, &quot;typeof(test) === &#039;undefined&#039; || test === null&quot; indicates to the next programmer (with fewer bytes than a comment) that you know precisely what your variable should contain.</p>
<p>Definitely agree with #3 &#8211; if you post your issue on <a href="http://tech.groups.yahoo.com/group/jslint_com/" rel="nofollow">http://tech.groups.yahoo.com/group/jslint_com/</a> Douglas usually responds very quickly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JSLint puked on my javascript! by James Padolsey</title>
		<link>http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/comment-page-1/#comment-1000</link>
		<dc:creator>James Padolsey</dc:creator>
		<pubDate>Wed, 07 Apr 2010 14:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=568#comment-1000</guid>
		<description>I&#039;m not sure what specs you were looking at but ECMAScript defines the following syntax:

if ( Expression ) Statement else Statement 
if ( Expression ) Statement

{...} (a block) is technically a statement in itself (a statement that contains statements). I tend to use blocks because, oddly, I find them more readable.

With the variable declaring issue, I always opt for declaring ALL variables at the top of the function -- you may as well, considering that they&#039;re all going to be &quot;hoisted&quot; there anyway...

I&#039;ve never had to use obj == null ... most of the time this is exactly the same as just &quot;obj&quot; in a boolean context. (i.e. if(obj){...} or !!obj).</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure what specs you were looking at but ECMAScript defines the following syntax:</p>
<p>if ( Expression ) Statement else Statement<br />
if ( Expression ) Statement</p>
<p>{&#8230;} (a block) is technically a statement in itself (a statement that contains statements). I tend to use blocks because, oddly, I find them more readable.</p>
<p>With the variable declaring issue, I always opt for declaring ALL variables at the top of the function &#8212; you may as well, considering that they&#8217;re all going to be &#8220;hoisted&#8221; there anyway&#8230;</p>
<p>I&#8217;ve never had to use obj == null &#8230; most of the time this is exactly the same as just &#8220;obj&#8221; in a boolean context. (i.e. if(obj){&#8230;} or !!obj).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JSLint puked on my javascript! by Tweets that mention JSLint puked on my javascript! &#124; Unscriptable.com -- Topsy.com</title>
		<link>http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/comment-page-1/#comment-996</link>
		<dc:creator>Tweets that mention JSLint puked on my javascript! &#124; Unscriptable.com -- Topsy.com</dc:creator>
		<pubDate>Wed, 07 Apr 2010 13:54:35 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=568#comment-996</guid>
		<description>[...] This post was mentioned on Twitter by John Hann, integralist. integralist said: RT @unscriptable: #JSLint puked on my #javascript! http://bit.ly/aqTrzG [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by John Hann, integralist. integralist said: RT @unscriptable: #JSLint puked on my #javascript! <a href="http://bit.ly/aqTrzG" rel="nofollow">http://bit.ly/aqTrzG</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JSLint puked on my javascript! by Krof Drakula</title>
		<link>http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/comment-page-1/#comment-991</link>
		<dc:creator>Krof Drakula</dc:creator>
		<pubDate>Wed, 07 Apr 2010 12:32:13 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=568#comment-991</guid>
		<description>Not sure about those points; but you can always address those issues on the JSLint group list at http://tech.groups.yahoo.com/group/jslint_com/ – Crockford personally oversees all the suggestions and usually integrates patches, fixes and enhancements in a matter of days.

Gotta hand it to Doug, he&#039;s sure streamlined the work he does on JSLint. ;)</description>
		<content:encoded><![CDATA[<p>Not sure about those points; but you can always address those issues on the JSLint group list at <a href="http://tech.groups.yahoo.com/group/jslint_com/" rel="nofollow">http://tech.groups.yahoo.com/group/jslint_com/</a> – Crockford personally oversees all the suggestions and usually integrates patches, fixes and enhancements in a matter of days.</p>
<p>Gotta hand it to Doug, he&#8217;s sure streamlined the work he does on JSLint. <img src='http://unscriptable.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JSLint puked on my javascript! by Rob McDonagh</title>
		<link>http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/comment-page-1/#comment-990</link>
		<dc:creator>Rob McDonagh</dc:creator>
		<pubDate>Wed, 07 Apr 2010 12:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=568#comment-990</guid>
		<description>I always had trouble with minification tools whenever I skipped the curly braces in IF, so I started insisting my team use them. Maybe the tools have gotten smarter since then? The side benefit, of course, was that grouping/nesting problems (which plagued one colleague in particular) magically went away. heh.

PS Old Rasputin FTW!</description>
		<content:encoded><![CDATA[<p>I always had trouble with minification tools whenever I skipped the curly braces in IF, so I started insisting my team use them. Maybe the tools have gotten smarter since then? The side benefit, of course, was that grouping/nesting problems (which plagued one colleague in particular) magically went away. heh.</p>
<p>PS Old Rasputin FTW!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JSLint puked on my javascript! by John H</title>
		<link>http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/comment-page-1/#comment-987</link>
		<dc:creator>John H</dc:creator>
		<pubDate>Wed, 07 Apr 2010 11:46:15 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=568#comment-987</guid>
		<description>Hey Krof, thanks for the info about the configuration options.  I used the online version at &lt;a href=&quot;http://jslint.com/&quot; rel=&quot;nofollow&quot;&gt;http://jslint.com/&lt;/a&gt;.  It&#039;s got only a few configuration options.  I imagine if I download and run it locally, it might have options for some of the other items I encountered.  

For instance, it also didn&#039;t like that I used unescaped curly braces in my regular expressions or that I used escaped line endings in my strings.  I imagine those might break some of the dumber minification tools.  

I didn&#039;t see any options for those on the site.  I think they should put some text in the options to let users know. Something like &quot;Want more options to configure jslint?  Download it for full control.&quot;  Or something like that.</description>
		<content:encoded><![CDATA[<p>Hey Krof, thanks for the info about the configuration options.  I used the online version at <a href="http://jslint.com/" rel="nofollow">http://jslint.com/</a>.  It&#8217;s got only a few configuration options.  I imagine if I download and run it locally, it might have options for some of the other items I encountered.  </p>
<p>For instance, it also didn&#8217;t like that I used unescaped curly braces in my regular expressions or that I used escaped line endings in my strings.  I imagine those might break some of the dumber minification tools.  </p>
<p>I didn&#8217;t see any options for those on the site.  I think they should put some text in the options to let users know. Something like &#8220;Want more options to configure jslint?  Download it for full control.&#8221;  Or something like that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JSLint puked on my javascript! by Krof Drakula</title>
		<link>http://unscriptable.com/index.php/2010/04/06/jslint-puked-on-my-javascript/comment-page-1/#comment-953</link>
		<dc:creator>Krof Drakula</dc:creator>
		<pubDate>Wed, 07 Apr 2010 06:31:55 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=568#comment-953</guid>
		<description>Well, looks like someone&#039;s feelings got hurt. :)

Joking aside, though, you can configure it so it only spits out errors and warnings that you do care about, which is what I respect about JSLint; not forcing itself upon the user with self-righteous demands. While I do agree with some of the points you&#039;ve raised (especially using clauses like the &#039;==&#039; you mentioned earlier), this tool is draconic for a reason – there&#039;s a myriad of developers who come from all sorts of backgrounds, and JSLint helps with the most common eyesores and no-nos.

While I agree, this tends to align itself with the way Apple treats its users (lock &#039;em out since they don&#039;t know what they&#039;re doing), but the fact that with a little configuration you can get only &quot;your&quot; good parts out of the parser, which makes it an excellent tool.</description>
		<content:encoded><![CDATA[<p>Well, looks like someone&#8217;s feelings got hurt. <img src='http://unscriptable.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Joking aside, though, you can configure it so it only spits out errors and warnings that you do care about, which is what I respect about JSLint; not forcing itself upon the user with self-righteous demands. While I do agree with some of the points you&#8217;ve raised (especially using clauses like the &#8216;==&#8217; you mentioned earlier), this tool is draconic for a reason – there&#8217;s a myriad of developers who come from all sorts of backgrounds, and JSLint helps with the most common eyesores and no-nos.</p>
<p>While I agree, this tends to align itself with the way Apple treats its users (lock &#8216;em out since they don&#8217;t know what they&#8217;re doing), but the fact that with a little configuration you can get only &#8220;your&#8221; good parts out of the parser, which makes it an excellent tool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Better Javascript Memoizer by uberVU - social comments</title>
		<link>http://unscriptable.com/index.php/2009/05/01/a-better-javascript-memoizer/comment-page-1/#comment-867</link>
		<dc:creator>uberVU - social comments</dc:creator>
		<pubDate>Sun, 31 Jan 2010 13:45:29 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=272#comment-867</guid>
		<description>&lt;strong&gt;Social comments and analytics for this post...&lt;/strong&gt;

This post was mentioned on Twitter by major_code: http://tinyurl.com/cwomvm 
A Better Javascript Memoizer &#124; Unscriptable.com...</description>
		<content:encoded><![CDATA[<p><strong>Social comments and analytics for this post&#8230;</strong></p>
<p>This post was mentioned on Twitter by major_code: <a href="http://tinyurl.com/cwomvm" rel="nofollow">http://tinyurl.com/cwomvm</a><br />
A Better Javascript Memoizer | Unscriptable.com&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Deduplicate any array in Javascript by John H</title>
		<link>http://unscriptable.com/index.php/2009/12/08/deduplicate-any-array-in-javascript/comment-page-1/#comment-818</link>
		<dc:creator>John H</dc:creator>
		<pubDate>Fri, 18 Dec 2009 14:43:56 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=467#comment-818</guid>
		<description>Is it &quot;just a little faster&quot; because the variable, &lt;code&gt;ary&lt;/code&gt;, is lower in the scope chain than &lt;code&gt;array&lt;/code&gt;? Or is there some special magic here?</description>
		<content:encoded><![CDATA[<p>Is it &#8220;just a little faster&#8221; because the variable, <code>ary</code>, is lower in the scope chain than <code>array</code>? Or is there some special magic here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Deduplicate any array in Javascript by fearphage</title>
		<link>http://unscriptable.com/index.php/2009/12/08/deduplicate-any-array-in-javascript/comment-page-1/#comment-813</link>
		<dc:creator>fearphage</dc:creator>
		<pubDate>Sat, 12 Dec 2009 11:59:49 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=467#comment-813</guid>
		<description>It can actually be just a little faster than that using the third parameter:
&lt;pre lang=&quot;javascript&quot;&gt;array.filter(function(item, i, ary) {
  return ary.indexOf(item) == i;
});&lt;/pre&gt;

(Corrected the variable names)</description>
		<content:encoded><![CDATA[<p>It can actually be just a little faster than that using the third parameter:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">array.<span style="color: #660066;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #339933;">,</span> i<span style="color: #339933;">,</span> ary<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> ary.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> i<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>(Corrected the variable names)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Deduplicate any array in Javascript by fearphage</title>
		<link>http://unscriptable.com/index.php/2009/12/08/deduplicate-any-array-in-javascript/comment-page-1/#comment-812</link>
		<dc:creator>fearphage</dc:creator>
		<pubDate>Sat, 12 Dec 2009 11:58:40 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=467#comment-812</guid>
		<description>It can actually be just a little faster than that using the third parameter::
&lt;pre lang=&quot;javascript&quot;&gt;array.filter(function(value, i, ary) {
  return ary.indexOf(item) == i;
});&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>It can actually be just a little faster than that using the third parameter::</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">array.<span style="color: #660066;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>value<span style="color: #339933;">,</span> i<span style="color: #339933;">,</span> ary<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> ary.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> i<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>Comment on Deduplicate any array in Javascript by fearphage</title>
		<link>http://unscriptable.com/index.php/2009/12/08/deduplicate-any-array-in-javascript/comment-page-1/#comment-809</link>
		<dc:creator>fearphage</dc:creator>
		<pubDate>Wed, 09 Dec 2009 17:05:13 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=467#comment-809</guid>
		<description>Why not use the native filter for primitives?

&lt;pre lang=&quot;javascript&quot;&gt;array.filter(function(item, i) {
  return array.indexOf(item) == i;
});&lt;/pre&gt;

I understand this won&#039;t work for complex objects and if you want them sorted, you&#039;ll have to do that afterwards.</description>
		<content:encoded><![CDATA[<p>Why not use the native filter for primitives?</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">array.<span style="color: #660066;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #339933;">,</span> i<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> array.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> i<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I understand this won&#8217;t work for complex objects and if you want them sorted, you&#8217;ll have to do that afterwards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Deduplicate any array in Javascript by Andrea Giammarchi</title>
		<link>http://unscriptable.com/index.php/2009/12/08/deduplicate-any-array-in-javascript/comment-page-1/#comment-808</link>
		<dc:creator>Andrea Giammarchi</dc:creator>
		<pubDate>Tue, 08 Dec 2009 23:58:39 +0000</pubDate>
		<guid isPermaLink="false">http://unscriptable.com/?p=467#comment-808</guid>
		<description>indexOf is unfortunately expensive only in IE where it&#039;s not native while splice could be expensive but above for loop is something extremely easy to maintain (5 line of code that should just work).
On the other hand I am using on up to two native methods against sort + forEach + map + push + all callbacks involved and executed for each index so I am kinda sure mine will perform 2 up to 5 times faster (in IE as example just sort is expensive).
Finally, if the goal is to make something portable for every case, objects included, with mine you are sure about unique primitives/instances so it depends what you need (if you need just to compare a single object property, mine won&#039;t make sense)
Regards</description>
		<content:encoded><![CDATA[<p>indexOf is unfortunately expensive only in IE where it&#8217;s not native while splice could be expensive but above for loop is something extremely easy to maintain (5 line of code that should just work).<br />
On the other hand I am using on up to two native methods against sort + forEach + map + push + all callbacks involved and executed for each index so I am kinda sure mine will perform 2 up to 5 times faster (in IE as example just sort is expensive).<br />
Finally, if the goal is to make something portable for every case, objects included, with mine you are sure about unique primitives/instances so it depends what you need (if you need just to compare a single object property, mine won&#8217;t make sense)<br />
Regards</p>
]]></content:encoded>
	</item>
</channel>
</rss>
