Skip to content

Commit 6471f84

Browse files
committed
jQuery.type(): correct terminology, add "boxed" examples
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
1 parent 4eefe05 commit 6471f84

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

entries/jQuery.type.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@
1919
<li>jQuery.type( null ) === "null"</li>
2020
</ul>
2121
</li>
22-
<li>If the object has an internal [[Class]] equivalent to one of the browser's built-in objects, the associated name is returned. (<a href="http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/">More details about this technique.</a>)
22+
<li>If the argument is either a primitive value or an instance of a standard built-in ECMAScript object, the [[Class]] internal property is used to determine the type. (<a href="http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/">More details about this technique.</a>)
2323
<ul>
2424
<li>jQuery.type( true ) === "boolean"</li>
25+
<li>jQuery.type( new Boolean() ) === "boolean"</li>
2526
<li>jQuery.type( 3 ) === "number"</li>
27+
<li>jQuery.type( new Number(3) ) === "number"</li>
2628
<li>jQuery.type( "test" ) === "string"</li>
29+
<li>jQuery.type( new String("test") ) === "string"<li>
2730
<li>jQuery.type( function(){} ) === "function"</li>
2831
<li>jQuery.type( [] ) === "array"</li>
32+
<li>jQuery.type( new Array() ) === "array"</li>
2933
<li>jQuery.type( new Date() ) === "date"</li>
3034
<li>jQuery.type( new Error() ) === "error" // <strong>as of jQuery 1.9</strong></li>
3135
<li>jQuery.type( /test/ ) === "regexp"</li>

0 commit comments

Comments
 (0)