<?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>Comentarios en: Detectar el tipo de una variable en Javascript</title>
	<atom:link href="http://www.anieto2k.com/2009/01/13/detectar-el-tipo-de-una-variable-en-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anieto2k.com/2009/01/13/detectar-el-tipo-de-una-variable-en-javascript/</link>
	<description>Desarrollo web, Wordpress, y alguna cosilla más</description>
	<lastBuildDate>Sun, 12 Feb 2012 12:01:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Por: omega3sources</title>
		<link>http://www.anieto2k.com/2009/01/13/detectar-el-tipo-de-una-variable-en-javascript/#comment-53516</link>
		<dc:creator>omega3sources</dc:creator>
		<pubDate>Tue, 20 Jan 2009 17:08:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.anieto2k.com/?p=7286#comment-53516</guid>
		<description>Excelente la verdad!!</description>
		<content:encoded><![CDATA[<p>Excelente la verdad!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: CSSBlog</title>
		<link>http://www.anieto2k.com/2009/01/13/detectar-el-tipo-de-una-variable-en-javascript/#comment-53485</link>
		<dc:creator>CSSBlog</dc:creator>
		<pubDate>Sat, 17 Jan 2009 22:40:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.anieto2k.com/?p=7286#comment-53485</guid>
		<description>Gracias por el dato, lo tendré en cuenta.</description>
		<content:encoded><![CDATA[<p>Gracias por el dato, lo tendré en cuenta.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Por: epplestun</title>
		<link>http://www.anieto2k.com/2009/01/13/detectar-el-tipo-de-una-variable-en-javascript/#comment-53323</link>
		<dc:creator>epplestun</dc:creator>
		<pubDate>Tue, 13 Jan 2009 09:34:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.anieto2k.com/?p=7286#comment-53323</guid>
		<description>Yo suelo hacer uso de una pequeña función:

&lt;pre&gt;&lt;code&gt;var _getType = function( inp ) {
        var type = typeof inp, match;
        var key;
        if (type == &#039;object&#039; &amp;&amp; !inp) {
            return &#039;null&#039;;
        }
        if (type == &quot;object&quot;) {
            if (!inp.constructor) {
                return &#039;object&#039;;
            }
            var cons = inp.constructor.toString();
            if (match = cons.match(/(\w+)\(/)) {
                cons = match[1].toLowerCase();
            }
            var types = [&quot;boolean&quot;, &quot;number&quot;, &quot;string&quot;, &quot;array&quot;];
            for (key in types) {
                if (cons == types[key]) {
                    type = types[key];
                    break;
                }
            }
        }
        return type;
    };&lt;/code&gt;&lt;/pre&gt;

La verdad es que es bastante útil :-)</description>
		<content:encoded><![CDATA[<p>Yo suelo hacer uso de una pequeña función:</p>
<pre><code>var _getType = function( inp ) {
        var type = typeof inp, match;
        var key;
        if (type == 'object' &amp;&amp; !inp) {
            return 'null';
        }
        if (type == "object") {
            if (!inp.constructor) {
                return 'object';
            }
            var cons = inp.constructor.toString();
            if (match = cons.match(/(\w+)\(/)) {
                cons = match[1].toLowerCase();
            }
            var types = ["boolean", "number", "string", "array"];
            for (key in types) {
                if (cons == types[key]) {
                    type = types[key];
                    break;
                }
            }
        }
        return type;
    };</code></pre>
<p>La verdad es que es bastante útil <img src='http://www.anieto2k.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

