").append(x.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ut,type:"GET",isLocal:Kt.test(Xt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":sn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?cn(cn(e,x.ajaxSettings),t):cn(x.ajaxSettings,e)},ajaxPrefilter:un(rn),ajaxTransport:un(on),ajax:function(e,t){"object"==typeof e&&(t=e,e=undefined),t=t||{};var n,r,i,o,s,a,u,l,c=x.ajaxSetup({},t),p=c.context||c,f=c.context&&(p.nodeType||p.jquery)?x(p):x.event,h=x.Deferred(),d=x.Callbacks("once memory"),g=c.statusCode||{},m={},y={},v=0,b="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===v){if(!o){o={};while(t=Qt.exec(i))o[t[1].toLowerCase()]=t[2]}t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===v?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return v||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return v||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>v)for(t in e)g[t]=[g[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),k(0,t),this}};if(h.promise(T).complete=d.add,T.success=T.done,T.error=T.fail,c.url=((e||c.url||Ut)+"").replace(Gt,"").replace(en,Xt[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=x.trim(c.dataType||"*").toLowerCase().match(w)||[""],null==c.crossDomain&&(a=tn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===Xt[1]&&a[2]===Xt[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(Xt[3]||("http:"===Xt[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=x.param(c.data,c.traditional)),ln(rn,c,t,T),2===v)return T;u=c.global,u&&0===x.active++&&x.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Zt.test(c.type),r=c.url,c.hasContent||(c.data&&(r=c.url+=(Vt.test(r)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=Jt.test(r)?r.replace(Jt,"$1_="+Yt++):r+(Vt.test(r)?"&":"?")+"_="+Yt++)),c.ifModified&&(x.lastModified[r]&&T.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&T.setRequestHeader("If-None-Match",x.etag[r])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&T.setRequestHeader("Content-Type",c.contentType),T.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+sn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)T.setRequestHeader(l,c.headers[l]);if(c.beforeSend&&(c.beforeSend.call(p,T,c)===!1||2===v))return T.abort();b="abort";for(l in{success:1,error:1,complete:1})T[l](c[l]);if(n=ln(on,c,t,T)){T.readyState=1,u&&f.trigger("ajaxSend",[T,c]),c.async&&c.timeout>0&&(s=setTimeout(function(){T.abort("timeout")},c.timeout));try{v=1,n.send(m,k)}catch(C){if(!(2>v))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,t,o,a){var l,m,y,b,w,C=t;2!==v&&(v=2,s&&clearTimeout(s),n=undefined,i=a||"",T.readyState=e>0?4:0,l=e>=200&&300>e||304===e,o&&(b=pn(c,T,o)),b=fn(c,b,T,l),l?(c.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(x.lastModified[r]=w),w=T.getResponseHeader("etag"),w&&(x.etag[r]=w)),204===e||"HEAD"===c.type?C="nocontent":304===e?C="notmodified":(C=b.state,m=b.data,y=b.error,l=!y)):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),T.status=e,T.statusText=(t||C)+"",l?h.resolveWith(p,[m,C,T]):h.rejectWith(p,[T,C,y]),T.statusCode(g),g=undefined,u&&f.trigger(l?"ajaxSuccess":"ajaxError",[T,c,l?m:y]),d.fireWith(p,[T,C]),u&&(f.trigger("ajaxComplete",[T,c]),--x.active||x.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,undefined,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,r,i){return x.isFunction(n)&&(i=i||r,r=n,n=undefined),x.ajax({url:e,type:t,dataType:i,data:n,success:r})}});function pn(e,t,n){var r,i,o,s,a=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):undefined}function fn(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(p){return{state:"parsererror",error:s?p:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=x("
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: datastore/transaction
+
+
+
+
+
+
+
+
+ datastore/transaction
+
+
+
+
+
+
+
+
+
+
+
+
+ new require("datastore/transaction")(conn, datasetId)
+
+
+
+
+ datastore/transaction.js, line 65
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ conn |
+
+
+
+
+
+module:common/connection.Connection
+
+
+
+ |
+
+
+
+
+
+ An authorized connection
+ to Google Cloud Datastore. |
+
+
+
+
+
+
+ datasetId |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ Dataset ID. This is your project ID from the
+ Google Developers Console. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ var Connection = require('lib/common/connection.js').Connection;
+var myConnection = new Connection({});
+var transaction = new Transaction(myConnection, 'my-project-id');
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+-
+
+
+
+
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
inner,constantHoststring
+
+
+
+
+-
+
+
+
to send with API requests.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
inner,constantNon-transactionstring
+
+
+
+
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
+
+
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
inner,constantTransactionstring
+
+
+
+
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
+
+
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+-
+
+
+
+ begin(callback)
+
+
+
+
+ datastore/transaction.js, line 95
+
+
+
+
+
+
+-
+
+
+
+
Begin a remote transaction and identify the current transaction instance with
+the remote transaction's ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+ The function to execute within the context of
+ a transaction. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ transaction.begin(function(err) {
+ // Perform Datastore operations as usual.
+ transaction.get(datastore.key('Company', 123), function(err, entity) {
+ // Commit the transaction.
+ transaction.finalize(function(err) {});
+
+ // Rollback the transaction.
+ transaction.rollback(function(err) {});
+ });
+});
+
+
+
+
+
+
+
+-
+
+
+
+ commit(callback)
+
+
+
+
+ datastore/transaction.js, line 153
+
+
+
+
+
+
+-
+
+
+
+
Commit the remote transaction and finalize the current transaction instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+ The callback function. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ transaction.begin(function(err) {
+ transaction.commit(function(err) {
+ if (err) {
+ // Transaction could not be committed.
+ }
+ });
+});
+
+
+
+
+
+
+
+-
+
+
+
+ delete(key, callback)
+
+
+
+
+ datastore/transaction.js, line 334
+
+
+
+
+
+
+-
+
+
+
+
Delete all entities identified with the specified key(s) in the current
+transaction.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+Key
+|
+
+Array.<Key>
+
+
+
+ |
+
+
+
+
+
+ Datastore key object(s). |
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+ The callback function. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ // These examples work with both a Transaction object and a Dataset object.
+
+// Delete a single entity.
+transaction.delete(datastore.key('Company', 123), function(err) {});
+
+// Delete multiple entities at once.
+transaction.delete([
+ datastore.key('Company', 123),
+ datastore.key('Product', 'Computer')
+], function(err) {});
+
+
+
+
+
+
+
+-
+
+
+
+ finalize(callback)
+
+
+
+
+ datastore/transaction.js, line 182
+
+
+
+
+
+
+-
+
+
+
+
Commit a transaction if it's not finalized yet.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+ The callback function. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ transaction.begin(function(err) {
+ transaction.finalize(function(err) {
+ if (err) {
+ // Transaction could not be finalized.
+ }
+ });
+});
+
+
+
+
+
+
+
+-
+
+
+
+ get(key, callback)
+
+
+
+
+ datastore/transaction.js, line 212
+
+
+
+
+
+
+-
+
+
+
+
Retrieve the entities identified with the specified key(s) in the current
+transaction. Get operations require a valid key to retrieve the
+key-identified entity from Datastore.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+module:datastore/entity~Key
+|
+
+Array.<module:datastore/entity~Key>
+
+
+
+ |
+
+
+
+
+
+ Datastore key object(s). |
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+ The callback function. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ // These examples work with both a Transaction object and a Dataset object.
+
+// Get a single entity.
+transaction.get(datastore.key('Company', 123), function(err, entity));
+
+// Get multiple entities at once.
+transaction.get([
+ datastore.key('Company', 123),
+ datastore.key('Product', 'Computer')
+], function(err, entities) {});
+
+
+
+
+
+
+
+-
+
+
+
+ makeReq(method, req, callbcak)
+
+
+
+
+ datastore/transaction.js, line 433
+
+
+
+
+
+
+-
+
+
+
+
Make a request to the API endpoint.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ method |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ Transaction action (allocateIds, commit, etc.). |
+
+
+
+
+
+
+ req |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+ Request configuration object. |
+
+
+
+
+
+
+ callbcak |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+ The callback function. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - TODO
+ -
+
+ - Handle non-HTTP 200 cases.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ var deleteRequest = {
+ MODE: 'NON_TRANSACTIONAL',
+ mutation: {
+ delete: [] // datastore key objects.
+ }
+};
+transaction.makeReq('commit', deleteRequest, function(err) {});
+
+
+
+
+
+
+
+-
+
+
+
+ mapQuery()
+
+
+
+
+ datastore/transaction.js, line 409
+
+
+
+
+
+
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - TODO
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
+
+ rollback(callback)
+
+
+
+
+ datastore/transaction.js, line 124
+
+
+
+
+
+
+-
+
+
+
+
Reverse a transaction remotely and finalize the current transaction instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+ The callback function. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ transaction.begin(function(err) {
+ transaction.rollback(function(err) {
+ if (err) {
+ // Transaction could not be rolled back.
+ }
+ });
+});
+
+
+
+
+
+
+
+-
+
+
+
+ runQuery(query, callback)
+
+
+
+
+ datastore/transaction.js, line 374
+
+
+
+
+
+
+-
+
+
+
+
Datastore allows you to query entities by kind, filter them by property
+filters, and sort them by a property name. Projection and pagination are also
+supported. If more results are available, a query to retrieve the next page
+is provided to the callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ query |
+
+
+
+
+
+Query
+
+
+
+ |
+
+
+
+
+
+ Query object. |
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+ The callback function. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ // Retrieve 5 companies.
+transaction.runQuery(queryObject, function(err, entities, nextQuery) {
+ // `nextQuery` is not null if there are more results.
+ if (nextQuery) {
+ transaction.runQuery(nextQuery, function(err, entities, nextQuery) {});
+ }
+});
+
+
+
+
+
+
+
+-
+
+
+
+ save(entities, callback)
+
+
+
+
+ datastore/transaction.js, line 274
+
+
+
+
+
+
+-
+
+
+
+
Insert or update the specified object(s) in the current transaction. If a
+key is incomplete, its associated object is inserted and its generated
+identifier is returned to the callback.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ entities |
+
+
+
+
+
+object
+|
+
+Array.<object>
+
+
+
+ |
+
+
+
+
+
+ Datastore key object(s).
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ key |
+
+
+
+
+
+Key
+
+
+
+ |
+
+
+
+
+
+ Datastore key object. |
+
+
+
+
+
+
+ data |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+ Data to save with the provided key. |
+
+
+
+
+
+ |
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+ The callback function. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ // These examples work with both a Transaction object and a Dataset object.
+
+// Save a single entity.
+transaction.save({
+ key: datastore.key('Company', null),
+ data: {
+ rating: '10'
+ }
+}, function(err, key) {
+ // Because we gave an incomplete key as an argument, `key` will be
+ // populated with the complete, generated key.
+});
+
+// Save multiple entities at once.
+transaction.save([
+ {
+ key: datastore.key('Company', 123),
+ data: {
+ HQ: 'Dallas, TX'
+ }
+ },
+ {
+ key: datastore.key('Product', 'Computer'),
+ data: {
+ vendor: 'Dell'
+ }
+ }
+], function(err, keys) {});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/html/util.html b/docs/html/util.html
new file mode 100644
index 000000000000..1106fbf95596
--- /dev/null
+++ b/docs/html/util.html
@@ -0,0 +1,1063 @@
+
+
+
+
+
Module: common/util
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Module: common/util
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+-
+
+
+
+ innerarrayize(input){array}
+
+
+
+
+ common/util.js, line 69
+
+
+
+
+
+
+-
+
+
+
+
Wrap an array around a non-Array object. If given an Array, it is returned.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ input |
+
+
+
+
+
+*
+
+
+
+ |
+
+
+
+
+
+ Non-array object to wrap. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ arrayize(2);
+// [ 2 ]
+
+arrayize(['Hi']);
+// [ 'Hi' ]
+
+
+
+
+
+
+
+-
+
+
+
+ innerextend(from, to){object}
+
+
+
+
+ common/util.js, line 33
+
+
+
+
+
+
+-
+
+
+
+
Extend a base object with properties from another.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ from |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+ The base object. |
+
+
+
+
+
+
+ to |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+ The object to extend with. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
+
+
+
+ common/util.js, line 94
+
+
+
+
+
+
+-
+
+
+
+
Format a string with values from the provided object.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ template |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+
+
+
+ String with {} denoted keys. (See example) |
+
+
+
+
+
+
+ args |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+ Key/value pairs matching the holes in the template. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ format('This is a {language} ({abbr}) codebase.', {
+ language: 'JavaScript',
+ abbr: 'JS'
+});
+// 'This is a JavaScript (JS) codebase.'
+
+
+
+
+
+
+
+-
+
+
+
+ innerhandleResp(err, resp, body, callback)
+
+
+
+
+ common/util.js, line 143
+
+
+
+
+
+
+-
+
+
+
+
Uniformly process an API response.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ err |
+
+
+
+
+
+*
+
+
+
+ |
+
+
+
+
+
+ Error value. |
+
+
+
+
+
+
+ resp |
+
+
+
+
+
+*
+
+
+
+ |
+
+
+
+
+
+ Response value. |
+
+
+
+
+
+
+ body |
+
+
+
+
+
+*
+
+
+
+ |
+
+
+
+
+
+ Body value. |
+
+
+
+
+
+
+ callback |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+ The callback function. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
+
+ innernoop()
+
+
+
+
+ common/util.js, line 112
+
+
+
+
+
+
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example
+
+
+
+ function doSomething(callback) {
+ callback = callback || noop;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/pubsub.md b/docs/pubsub.md
new file mode 100644
index 000000000000..37db24181c91
--- /dev/null
+++ b/docs/pubsub.md
@@ -0,0 +1,86 @@
+#Index
+
+**Functions**
+
+* [Topic(conn, name)](#Topic)
+ * [topic.publish(data, callback)](#Topic#publish)
+ * [topic.publishMessage(message, callback)](#Topic#publishMessage)
+ * [topic.del(callback)](#Topic#del)
+* [Connection()](#Connection)
+ * [connection.listSubscriptions(callback)](#Connection#listSubscriptions)
+ * [connection.getSubscription(name, callback)](#Connection#getSubscription)
+ * [connection.subscribe(name)](#Connection#subscribe)
+ * [connection.listTopics(callback)](#Connection#listTopics)
+ * [connection.getTopic(name, callback)](#Connection#getTopic)
+ * [connection.createTopic(name, callback)](#Connection#createTopic)
+ * [connection.fullTopicName_()](#Connection#fullTopicName_)
+ * [connection.fullProjectName_()](#Connection#fullProjectName_)
+
+**Members**
+
+* [PUBSUB_BASE_URL](#PUBSUB_BASE_URL)
+* [SCOPES](#SCOPES)
+* [Connection](#Connection)
+ * [connection.listSubscriptions(callback)](#Connection#listSubscriptions)
+ * [connection.getSubscription(name, callback)](#Connection#getSubscription)
+ * [connection.subscribe(name)](#Connection#subscribe)
+ * [connection.listTopics(callback)](#Connection#listTopics)
+ * [connection.getTopic(name, callback)](#Connection#getTopic)
+ * [connection.createTopic(name, callback)](#Connection#createTopic)
+ * [connection.fullTopicName_()](#Connection#fullTopicName_)
+ * [connection.fullProjectName_()](#Connection#fullProjectName_)
+* [Topic](#Topic)
+ * [topic.publish(data, callback)](#Topic#publish)
+ * [topic.publishMessage(message, callback)](#Topic#publishMessage)
+ * [topic.del(callback)](#Topic#del)
+* [Subscription](#Subscription)
+ * [subscription.ack(ids, callback)](#Subscription#ack)
+ * [subscription.pull(callback)](#Subscription#pull)
+ * [subscription.startPulling_()](#Subscription#startPulling_)
+ * [subscription.del(callback)](#Subscription#del)
+ * [subscription.close()](#Subscription#close)
+ * [subscription.emitMessage_()](#Subscription#emitMessage_)
+ * [subscription.emitError_()](#Subscription#emitError_)
+
+
+#Topic(conn, name)
+Represents a Google Cloud Pub/Sub API topic.
+
+**Params**
+
+- conn
[Connection](#Connection)
- Authorized connection.
+- name `string` - Full name of the topic.
+
+
+#Connection()
+Represents connection to Google Cloud Pub/Sub API.
+
+**Params**
+
+ - projectId `string` - Google Developers Console Project ID.
+ - email `string` - Service account email.
+ - pemFilePath `string` - Path to the pem file that contains your
+ private key.
+
+
+#PUBSUB_BASE_URL
+Base URL for Pub/Sub API.
+
+**Type**: `String`
+
+#SCOPES
+Required scopes for Pub/Sub API.
+
+**Type**: `Array`
+
+#Connection
+Exports Connection.
+
+
+#Topic
+Exports Topic.
+
+
+#Subscription
+Exports Subscription.
+
diff --git a/docs/readme.md b/docs/readme.md
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/docs/storage.md b/docs/storage.md
new file mode 100644
index 000000000000..aad9b46a7380
--- /dev/null
+++ b/docs/storage.md
@@ -0,0 +1,74 @@
+
+#storage
+**Members**
+
+* [storage](#module_storage)
+ * [storage~conn](#module_storage..conn)
+ * [storage~util](#module_storage..util)
+ * [storage~Bucket(options)](#module_storage..Bucket)
+ * [bucket.list([query], callback)](#module_storage..Bucket#list)
+ * [bucket.stat(name, callback)](#module_storage..Bucket#stat)
+ * [bucket.copy(name, metadata, [callback])](#module_storage..Bucket#copy)
+ * [bucket.remove(name, callback)](#module_storage..Bucket#remove)
+ * [bucket.createReadStream(name)](#module_storage..Bucket#createReadStream)
+ * [bucket.createWriteStream(name, [metadata])](#module_storage..Bucket#createWriteStream)
+ * [bucket.write(name, options, [callback])](#module_storage..Bucket#write)
+ * [bucket.getWritableStream_(name, metadata, callback)](#module_storage..Bucket#getWritableStream_)
+ * [bucket.makeReq(method, path, query, body, callback)](#module_storage..Bucket#makeReq)
+ * [const: storage~SCOPES](#module_storage..SCOPES)
+ * [const: storage~STORAGE_BASE_URL](#module_storage..STORAGE_BASE_URL)
+ * [const: storage~STORAGE_UPLOAD_BASE_URL](#module_storage..STORAGE_UPLOAD_BASE_URL)
+
+
+##storage~conn
+**Scope**: inner member of [storage](#module_storage)
+**Type**: [module:common/connection](module:common/connection)
+
+##storage~util
+**Scope**: inner member of [storage](#module_storage)
+**Type**: [module:common/util](module:common/util)
+
+##storage~Bucket(options)
+Google Cloud Storage allows you to store data on Google infrastructure. See
+the guide on [https://developers.google.com/storage](https://developers.google.com/storage) to create a
+bucket.
+
+**Params**
+
+- options `object` - Configuration options.
+ - bucketName `string` - Name of the bucket.
+ - keyFileName `string` - Full path to the JSON key downloaded
+ from the Google Developers Console.
+
+**Scope**: inner function of [storage](#module_storage)
+**Example**
+```js
+var gcloud = require('gcloud');
+var bucket;
+
+// From Google Compute Engine
+bucket = new gcloud.storage.Bucket({
+ bucketName: YOUR_BUCKET_NAME
+});
+
+// From elsewhere
+bucket = new gcloud.storage.Bucket({
+ bucketName: YOUR_BUCKET_NAME,
+ keyFilename: '/path/to/the/key.json'
+});
+```
+
+
+##const: storage~SCOPES
+Required scopes for Google Cloud Storage API.
+
+**Scope**: inner constant of [storage](#module_storage)
+**Type**: `array`
+
+##const: storage~STORAGE_BASE_URL
+**Scope**: inner constant of [storage](#module_storage)
+**Type**: `string`
+
+##const: storage~STORAGE_UPLOAD_BASE_URL
+**Scope**: inner constant of [storage](#module_storage)
+**Type**: `string`
diff --git a/docs/templates/jaguarjs-jsdoc/LICENSE b/docs/templates/jaguarjs-jsdoc/LICENSE
new file mode 100644
index 000000000000..6b7adcd764bc
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Sangmin, Shim
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/docs/templates/jaguarjs-jsdoc/conf.json b/docs/templates/jaguarjs-jsdoc/conf.json
new file mode 100644
index 000000000000..455985ddefec
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/conf.json
@@ -0,0 +1,34 @@
+{
+ "tags": {
+ "allowUnknownTags" : true
+ },
+ "plugins": ["plugins/markdown"],
+ "templates": {
+ "cleverLinks": true,
+ "monospaceLinks": true,
+ "default": {
+ "outputSourceFiles" : true
+ },
+ "applicationName": "Demo",
+ "disqus": "",
+ "googleAnalytics": "",
+ "openGraph": {
+ "title": "",
+ "type": "website",
+ "image": "",
+ "site_name": "",
+ "url": ""
+ },
+ "meta": {
+ "title": "",
+ "description": "",
+ "keyword": ""
+ },
+ "linenums": false
+ },
+ "markdown": {
+ "parser": "gfm",
+ "hardwrap": true,
+ "tags": ["examples"]
+ }
+}
diff --git a/docs/templates/jaguarjs-jsdoc/publish.js b/docs/templates/jaguarjs-jsdoc/publish.js
new file mode 100644
index 000000000000..2acaa569b5af
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/publish.js
@@ -0,0 +1,516 @@
+/*global env: true */
+var template = require('jsdoc/template'),
+ fs = require('jsdoc/fs'),
+ path = require('jsdoc/path'),
+ taffy = require('taffydb').taffy,
+ handle = require('jsdoc/util/error').handle,
+ helper = require('jsdoc/util/templateHelper'),
+ _ = require('underscore'),
+ htmlsafe = helper.htmlsafe,
+ linkto = helper.linkto,
+ resolveAuthorLinks = helper.resolveAuthorLinks,
+ scopeToPunc = helper.scopeToPunc,
+ hasOwnProp = Object.prototype.hasOwnProperty,
+ data,
+ view,
+ outdir = env.opts.destination;
+
+function find(spec) {
+ return helper.find(data, spec);
+}
+
+function tutoriallink(tutorial) {
+ return helper.toTutorial(tutorial, null, { tag: 'em', classname: 'disabled', prefix: 'Tutorial: ' });
+}
+
+function getAncestorLinks(doclet) {
+ return helper.getAncestorLinks(data, doclet);
+}
+
+function hashToLink(doclet, hash) {
+ if ( !/^(#.+)/.test(hash) ) { return hash; }
+
+ var url = helper.createLink(doclet);
+
+ url = url.replace(/(#.+|$)/, hash);
+ return '
' + hash + '';
+}
+
+function needsSignature(doclet) {
+ var needsSig = false;
+
+ // function and class definitions always get a signature
+ if (doclet.kind === 'function' || doclet.kind === 'class') {
+ needsSig = true;
+ }
+ // typedefs that contain functions get a signature, too
+ else if (doclet.kind === 'typedef' && doclet.type && doclet.type.names &&
+ doclet.type.names.length) {
+ for (var i = 0, l = doclet.type.names.length; i < l; i++) {
+ if (doclet.type.names[i].toLowerCase() === 'function') {
+ needsSig = true;
+ break;
+ }
+ }
+ }
+
+ return needsSig;
+}
+
+function addSignatureParams(f) {
+ var params = helper.getSignatureParams(f, 'optional');
+
+ f.signature = (f.signature || '') + '('+params.join(', ')+')';
+}
+
+function addSignatureReturns(f) {
+ var returnTypes = helper.getSignatureReturns(f);
+
+ f.signature = '
'+(f.signature || '') + '';
+
+ if (returnTypes.length) {
+ f.signature += '
'+(returnTypes.length ? '{'+returnTypes.join('|')+'}' : '')+'';
+ }
+}
+
+function addSignatureTypes(f) {
+ var types = helper.getSignatureTypes(f);
+
+ f.signature = (f.signature || '') + '
'+(types.length? ' :'+types.join('|') : '')+'';
+}
+
+function addAttribs(f) {
+ var attribs = helper.getAttribs(f);
+
+ if (attribs.length) {
+ f.attribs = '
' + htmlsafe(attribs.length ? attribs.join(',') : '') + '';
+ }
+}
+
+function shortenPaths(files, commonPrefix) {
+ // always use forward slashes
+ var regexp = new RegExp('\\\\', 'g');
+
+ Object.keys(files).forEach(function(file) {
+ files[file].shortened = files[file].resolved.replace(commonPrefix, '')
+ .replace(regexp, '/');
+ });
+
+ return files;
+}
+
+function resolveSourcePath(filepath) {
+ return path.resolve(process.cwd(), filepath);
+}
+
+function getPathFromDoclet(doclet) {
+ if (!doclet.meta) {
+ return;
+ }
+
+ var filepath = doclet.meta.path && doclet.meta.path !== 'null' ?
+ doclet.meta.path + '/' + doclet.meta.filename :
+ doclet.meta.filename;
+
+ return filepath;
+}
+
+function generate(title, docs, filename, resolveLinks) {
+ resolveLinks = resolveLinks === false ? false : true;
+
+ var docData = {
+ filename: filename,
+ title: title,
+ docs: docs
+ };
+
+ var outpath = path.join(outdir, filename),
+ html = view.render('container.tmpl', docData);
+
+ if (resolveLinks) {
+ html = helper.resolveLinks(html); // turn {@link foo} into
foo
+ }
+
+ fs.writeFileSync(outpath, html, 'utf8');
+}
+
+function generateSourceFiles(sourceFiles) {
+ Object.keys(sourceFiles).forEach(function(file) {
+ var source;
+ // links are keyed to the shortened path in each doclet's `meta.filename` property
+ var sourceOutfile = helper.getUniqueFilename(sourceFiles[file].shortened);
+ helper.registerLink(sourceFiles[file].shortened, sourceOutfile);
+
+ try {
+ source = {
+ kind: 'source',
+ code: helper.htmlsafe( fs.readFileSync(sourceFiles[file].resolved, 'utf8') )
+ };
+ }
+ catch(e) {
+ handle(e);
+ }
+
+ generate('Source: ' + sourceFiles[file].shortened, [source], sourceOutfile,
+ false);
+ });
+}
+
+/**
+ * Look for classes or functions with the same name as modules (which indicates that the module
+ * exports only that class or function), then attach the classes or functions to the `module`
+ * property of the appropriate module doclets. The name of each class or function is also updated
+ * for display purposes. This function mutates the original arrays.
+ *
+ * @private
+ * @param {Array.
} doclets - The array of classes and functions to
+ * check.
+ * @param {Array.} modules - The array of module doclets to search.
+ */
+function attachModuleSymbols(doclets, modules) {
+ var symbols = {};
+
+ // build a lookup table
+ doclets.forEach(function(symbol) {
+ symbols[symbol.longname] = symbol;
+ });
+
+ return modules.map(function(module) {
+ if (symbols[module.longname]) {
+ module.module = symbols[module.longname];
+ module.module.name = module.module.name.replace('module:', 'require("') + '")';
+ }
+ });
+}
+
+/**
+ * Create the navigation sidebar.
+ * @param {object} members The members that will be used to create the sidebar.
+ * @param {array '}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
\ No newline at end of file
diff --git a/docs/templates/jaguarjs-jsdoc/static/scripts/jquery.min.js b/docs/templates/jaguarjs-jsdoc/static/scripts/jquery.min.js
new file mode 100644
index 000000000000..9a85bd346253
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/static/scripts/jquery.min.js
@@ -0,0 +1,6 @@
+/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
+//@ sourceMappingURL=jquery.min.map
+*/
+(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return f.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,p,f,h,d,g,m,y,v="sizzle"+-new Date,b=e.document,w=0,T=0,C=st(),k=st(),N=st(),E=!1,S=function(e,t){return e===t?(E=!0,0):0},j=typeof undefined,D=1<<31,A={}.hasOwnProperty,L=[],q=L.pop,H=L.push,O=L.push,F=L.slice,P=L.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",$=W.replace("w","w#"),B="\\["+M+"*("+W+")"+M+"*(?:([*^$|!~]?=)"+M+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+$+")|)|)"+M+"*\\]",I=":("+W+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+B.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=RegExp("^"+M+"*,"+M+"*"),X=RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=RegExp(M+"*[+~]"),Y=RegExp("="+M+"*([^\\]'\"]*)"+M+"*\\]","g"),V=RegExp(I),G=RegExp("^"+$+"$"),J={ID:RegExp("^#("+W+")"),CLASS:RegExp("^\\.("+W+")"),TAG:RegExp("^("+W.replace("w","w*")+")"),ATTR:RegExp("^"+B),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:RegExp("^(?:"+R+")$","i"),needsContext:RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{O.apply(L=F.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(it){O={apply:L.length?function(e,t){H.apply(e,F.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function ot(e,t,r,i){var o,s,a,u,l,f,g,m,x,w;if((t?t.ownerDocument||t:b)!==p&&c(t),t=t||p,r=r||[],!e||"string"!=typeof e)return r;if(1!==(u=t.nodeType)&&9!==u)return[];if(h&&!i){if(o=K.exec(e))if(a=o[1]){if(9===u){if(s=t.getElementById(a),!s||!s.parentNode)return r;if(s.id===a)return r.push(s),r}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&y(t,s)&&s.id===a)return r.push(s),r}else{if(o[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=o[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&(!d||!d.test(e))){if(m=g=v,x=t,w=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(g=t.getAttribute("id"))?m=g.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=f.length;while(l--)f[l]=m+mt(f[l]);x=U.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return O.apply(r,x.querySelectorAll(w)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,r,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>i.cacheLength&&delete t[e.shift()],t[n]=r}return t}function at(e){return e[v]=!0,e}function ut(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--)i.attrHandle[n[r]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return at(function(t){return t=+t,at(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},n=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:b,r=t.defaultView;return t!==p&&9===t.nodeType&&t.documentElement?(p=t,f=t.documentElement,h=!s(t),r&&r.attachEvent&&r!==r.top&&r.attachEvent("onbeforeunload",function(){c()}),n.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ut(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=ut(function(e){return e.innerHTML="").append(x.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ut,type:"GET",isLocal:Kt.test(Xt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":sn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?cn(cn(e,x.ajaxSettings),t):cn(x.ajaxSettings,e)},ajaxPrefilter:un(rn),ajaxTransport:un(on),ajax:function(e,t){"object"==typeof e&&(t=e,e=undefined),t=t||{};var n,r,i,o,s,a,u,l,c=x.ajaxSetup({},t),p=c.context||c,f=c.context&&(p.nodeType||p.jquery)?x(p):x.event,h=x.Deferred(),d=x.Callbacks("once memory"),g=c.statusCode||{},m={},y={},v=0,b="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===v){if(!o){o={};while(t=Qt.exec(i))o[t[1].toLowerCase()]=t[2]}t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===v?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return v||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return v||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>v)for(t in e)g[t]=[g[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),k(0,t),this}};if(h.promise(T).complete=d.add,T.success=T.done,T.error=T.fail,c.url=((e||c.url||Ut)+"").replace(Gt,"").replace(en,Xt[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=x.trim(c.dataType||"*").toLowerCase().match(w)||[""],null==c.crossDomain&&(a=tn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===Xt[1]&&a[2]===Xt[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(Xt[3]||("http:"===Xt[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=x.param(c.data,c.traditional)),ln(rn,c,t,T),2===v)return T;u=c.global,u&&0===x.active++&&x.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Zt.test(c.type),r=c.url,c.hasContent||(c.data&&(r=c.url+=(Vt.test(r)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=Jt.test(r)?r.replace(Jt,"$1_="+Yt++):r+(Vt.test(r)?"&":"?")+"_="+Yt++)),c.ifModified&&(x.lastModified[r]&&T.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&T.setRequestHeader("If-None-Match",x.etag[r])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&T.setRequestHeader("Content-Type",c.contentType),T.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+sn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)T.setRequestHeader(l,c.headers[l]);if(c.beforeSend&&(c.beforeSend.call(p,T,c)===!1||2===v))return T.abort();b="abort";for(l in{success:1,error:1,complete:1})T[l](c[l]);if(n=ln(on,c,t,T)){T.readyState=1,u&&f.trigger("ajaxSend",[T,c]),c.async&&c.timeout>0&&(s=setTimeout(function(){T.abort("timeout")},c.timeout));try{v=1,n.send(m,k)}catch(C){if(!(2>v))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,t,o,a){var l,m,y,b,w,C=t;2!==v&&(v=2,s&&clearTimeout(s),n=undefined,i=a||"",T.readyState=e>0?4:0,l=e>=200&&300>e||304===e,o&&(b=pn(c,T,o)),b=fn(c,b,T,l),l?(c.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(x.lastModified[r]=w),w=T.getResponseHeader("etag"),w&&(x.etag[r]=w)),204===e||"HEAD"===c.type?C="nocontent":304===e?C="notmodified":(C=b.state,m=b.data,y=b.error,l=!y)):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),T.status=e,T.statusText=(t||C)+"",l?h.resolveWith(p,[m,C,T]):h.rejectWith(p,[T,C,y]),T.statusCode(g),g=undefined,u&&f.trigger(l?"ajaxSuccess":"ajaxError",[T,c,l?m:y]),d.fireWith(p,[T,C]),u&&(f.trigger("ajaxComplete",[T,c]),--x.active||x.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,undefined,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,r,i){return x.isFunction(n)&&(i=i||r,r=n,n=undefined),x.ajax({url:e,type:t,dataType:i,data:n,success:r})}});function pn(e,t,n){var r,i,o,s,a=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):undefined}function fn(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(p){return{state:"parsererror",error:s?p:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=x("
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/templates/jaguarjs-jsdoc/tmpl/mainpage.tmpl b/docs/templates/jaguarjs-jsdoc/tmpl/mainpage.tmpl
new file mode 100644
index 000000000000..41abaa18e119
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/tmpl/mainpage.tmpl
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/templates/jaguarjs-jsdoc/tmpl/members.tmpl b/docs/templates/jaguarjs-jsdoc/tmpl/members.tmpl
new file mode 100644
index 000000000000..b50a5e8d5eff
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/tmpl/members.tmpl
@@ -0,0 +1,34 @@
+' + self.linkto(name, self.htmlsafe(name)) + ' ';
+ });
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Example 1? 's':'' ?>
+
+
+
diff --git a/docs/templates/jaguarjs-jsdoc/tmpl/method.tmpl b/docs/templates/jaguarjs-jsdoc/tmpl/method.tmpl
new file mode 100644
index 000000000000..8b629f353934
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/tmpl/method.tmpl
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ ,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+ This:
+
+
+
+
+
+
+
+
+
+
+ Fires:
+
+
+
+
+ Listens to Events:
+
+
+
+
+ Listeners of This Event:
+
+
+
+
+ Throws:
+ 1) { ?>
+
+
+
+
+ 1) { ?>Returns:
+
+
+
+
+ Example 1? 's':'' ?>
+
+
+
diff --git a/docs/templates/jaguarjs-jsdoc/tmpl/navigation.tmpl b/docs/templates/jaguarjs-jsdoc/tmpl/navigation.tmpl
new file mode 100644
index 000000000000..0f70feb0709b
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/tmpl/navigation.tmpl
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ static
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/templates/jaguarjs-jsdoc/tmpl/params.tmpl b/docs/templates/jaguarjs-jsdoc/tmpl/params.tmpl
new file mode 100644
index 000000000000..8a472f298de9
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/tmpl/params.tmpl
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+ optional
+
+
+ nullable
+
+
+
+ repeatable
+
+
+
+
+ |
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/templates/jaguarjs-jsdoc/tmpl/properties.tmpl b/docs/templates/jaguarjs-jsdoc/tmpl/properties.tmpl
new file mode 100644
index 000000000000..97a3d23abd0d
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/tmpl/properties.tmpl
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+
|
+
+
+
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+ <nullable>
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ Properties
+ |
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/templates/jaguarjs-jsdoc/tmpl/returns.tmpl b/docs/templates/jaguarjs-jsdoc/tmpl/returns.tmpl
new file mode 100644
index 000000000000..e23e5a2c346f
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/tmpl/returns.tmpl
@@ -0,0 +1,77 @@
+/g, '');
+
+ var isNamed = ret.name ? true : false;
+ var name = ret.name || ret.description;
+ var startSpacePos = name.indexOf(" ");
+
+ if (parentReturn !== null && name.indexOf(parentReturn.name + '.') === 0) {
+ ret.name = isNamed ? name.substr(parentReturn.name.length + 1) : name.substr(parentReturn.name.length + 1, startSpacePos - (parentReturn.name.length + 1));
+
+ if (!isNamed) {
+ ret.description = ret.description.substr(startSpacePos + 1);
+ }
+
+ parentReturn.subReturns = parentReturn.subReturns || [];
+ parentReturn.subReturns.push(ret);
+ returns[i] = null;
+ } else {
+ if (!isNamed) {
+ ret.name = ret.description.substr(0, startSpacePos !== -1 ? startSpacePos : ret.description.length);
+ ret.description = startSpacePos !== -1 ? ret.description.substr(startSpacePos + 1) : '';
+ }
+
+ parentReturn = ret;
+ }
+ }
+});
+?>
+
+ 1) {
+?>
+
+
+
+ Name |
+ Type |
+ Description |
+
+
+
+
+
+
|
+
+
+
+ |
+
+ |
+
+
+ |
+
+
+
+
+
+
Returns:
+
+
+
\ No newline at end of file
diff --git a/docs/templates/jaguarjs-jsdoc/tmpl/source.tmpl b/docs/templates/jaguarjs-jsdoc/tmpl/source.tmpl
new file mode 100644
index 000000000000..6e2a29fdcf60
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/tmpl/source.tmpl
@@ -0,0 +1,8 @@
+
+
diff --git a/docs/templates/jaguarjs-jsdoc/tmpl/tutorial.tmpl b/docs/templates/jaguarjs-jsdoc/tmpl/tutorial.tmpl
new file mode 100644
index 000000000000..b0c79c1dd783
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/tmpl/tutorial.tmpl
@@ -0,0 +1,19 @@
+
diff --git a/docs/templates/jaguarjs-jsdoc/tmpl/type.tmpl b/docs/templates/jaguarjs-jsdoc/tmpl/type.tmpl
new file mode 100644
index 000000000000..db8194d6d01f
--- /dev/null
+++ b/docs/templates/jaguarjs-jsdoc/tmpl/type.tmpl
@@ -0,0 +1,7 @@
+
+
+|
+
\ No newline at end of file
diff --git a/package.json b/package.json
index 537845620bef..299a769bb828 100644
--- a/package.json
+++ b/package.json
@@ -43,14 +43,17 @@
"request": "^2.39.0"
},
"devDependencies": {
+ "coveralls": "^2.11.1",
"istanbul": "^0.3.0",
+ "jsdoc": "^3.3.0-alpha9",
+ "jsdoc-to-markdown": "^0.5.6",
"jshint": "^2.5.2",
"mocha": "^1.21.3",
"sandboxed-module": "^1.0.1",
- "tmp": "0.0.24",
- "coveralls": "^2.11.1"
+ "tmp": "0.0.24"
},
"scripts": {
+ "docs": "jsdoc -c .jsdoc & jsdoc2md lib/*.js > docs/readme.md & jsdoc2md lib/common/*.js > docs/common.md & jsdoc2md lib/datastore/*.js > docs/datastore.md & jsdoc2md lib/pubsub/*.js > docs/pubsub.md & jsdoc2md lib/storage/*.js > docs/storage.md",
"lint": "jshint lib/ regression/ test/",
"test": "mocha --recursive --reporter spec",
"regression-test": "mocha regression/ --reporter spec --timeout 15000",