Updated to latest jsonld.js.
authorDave Longley <dlongley@digitalbazaar.com>
Mon, 16 Apr 2012 16:33:24 -0400
changeset 525 16d6ecb348bf
parent 524 56ff08ee1248
child 526 f7050a46c4ba
Updated to latest jsonld.js.
playground/jsonld.js
--- a/playground/jsonld.js	Mon Apr 16 16:15:05 2012 -0400
+++ b/playground/jsonld.js	Mon Apr 16 16:33:24 2012 -0400
@@ -2855,7 +2855,8 @@
  * @return true if the input is an Object, false if not.
  */
 function _isObject(input) {
-  return (input && input.constructor === Object);
+  return (input !== null && !_isUndefined(input) &&
+    input.constructor === Object);
 }
 
 /**
@@ -2877,7 +2878,8 @@
  * @return true if the input is an Array, false if not.
  */
 function _isArray(input) {
-  return (input && input.constructor === Array);
+  return (input !== null && !_isUndefined(input) &&
+    input.constructor === Array);
 }
 
 /**
@@ -2907,7 +2909,8 @@
  * @return true if the input is a String, false if not.
  */
 function _isString(input) {
-  return (input && input.constructor === String);
+  return (input !== null && !_isUndefined(input) &&
+    input.constructor === String);
 }
 
 /**
@@ -2918,7 +2921,8 @@
  * @return true if the input is a Number, false if not.
  */
 function _isNumber(input) {
-  return (input && input.constructor === Number);
+  return (input !== null && !_isUndefined(input) &&
+    input.constructor === Number);
 }
 
 /**
@@ -2940,7 +2944,8 @@
  * @return true if the input is a Boolean, false if not.
  */
 function _isBoolean(input) {
-  return (input && input.constructor === Boolean);
+  return (input !== null && !_isUndefined(input) &&
+    input.constructor === Boolean);
 }
 
 /**