Update to latest jsonld.js.
authorDave Longley <dlongley@digitalbazaar.com>
Tue, 13 Nov 2012 14:03:52 -0500
changeset 959 b3cbe373e555
parent 958 d921922105e9
child 960 6f71d3b78b32
Update to latest jsonld.js.
playground/jsonld.js
--- a/playground/jsonld.js	Tue Nov 13 07:40:15 2012 -0800
+++ b/playground/jsonld.js	Tue Nov 13 14:03:52 2012 -0500
@@ -1001,8 +1001,14 @@
   }
 }
 
-// export browser API
-if(_browser) {
+// export AMD API
+if(typeof define === 'function' && define.amd) {
+  define('jsonld', [], function() {
+    return jsonld;
+  });
+}
+// export simple browser API
+else if(_browser) {
   window.jsonld = window.jsonld || jsonld;
 }