ProtoBuf.Util.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Namespace: Util</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Namespace: Util</h1>
  17. <section>
  18. <header>
  19. <h2>
  20. <span class="ancestors"><a href="ProtoBuf.html">ProtoBuf</a>.</span>
  21. Util
  22. </h2>
  23. </header>
  24. <article>
  25. <div class="container-overview">
  26. <div class="description"><p>ProtoBuf utilities.</p></div>
  27. <dl class="details">
  28. <dt class="tag-source">Source:</dt>
  29. <dd class="tag-source"><ul class="dummy"><li>
  30. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line304">line 304</a>
  31. </li></ul></dd>
  32. </dl>
  33. </div>
  34. <h3 class="subsection-title">Members</h3>
  35. <h4 class="name" id=".IS_NODE"><span class="type-signature">(static, constant) </span>IS_NODE<span class="type-signature"> :boolean</span></h4>
  36. <div class="description">
  37. <p>Flag if running in node or not.</p>
  38. </div>
  39. <h5>Type:</h5>
  40. <ul>
  41. <li>
  42. <span class="param-type">boolean</span>
  43. </li>
  44. </ul>
  45. <dl class="details">
  46. <dt class="tag-source">Source:</dt>
  47. <dd class="tag-source"><ul class="dummy"><li>
  48. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line312">line 312</a>
  49. </li></ul></dd>
  50. </dl>
  51. <h3 class="subsection-title">Methods</h3>
  52. <h4 class="name" id=".fetch"><span class="type-signature">(static) </span>fetch<span class="signature">(path, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {string|undefined}</span></h4>
  53. <div class="description">
  54. <p>Fetches a resource.</p>
  55. </div>
  56. <h5>Parameters:</h5>
  57. <table class="params">
  58. <thead>
  59. <tr>
  60. <th>Name</th>
  61. <th>Type</th>
  62. <th>Attributes</th>
  63. <th class="last">Description</th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. <tr>
  68. <td class="name"><code>path</code></td>
  69. <td class="type">
  70. <span class="param-type">string</span>
  71. </td>
  72. <td class="attributes">
  73. </td>
  74. <td class="description last"><p>Resource path</p></td>
  75. </tr>
  76. <tr>
  77. <td class="name"><code>callback</code></td>
  78. <td class="type">
  79. <span class="param-type">function</span>
  80. </td>
  81. <td class="attributes">
  82. &lt;optional><br>
  83. </td>
  84. <td class="description last"><p>Callback receiving the resource's contents. If omitted the resource will
  85. be fetched synchronously. If the request failed, contents will be null.</p></td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. <dl class="details">
  90. <dt class="tag-source">Source:</dt>
  91. <dd class="tag-source"><ul class="dummy"><li>
  92. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line350">line 350</a>
  93. </li></ul></dd>
  94. </dl>
  95. <h5>Returns:</h5>
  96. <div class="param-desc">
  97. <p>Resource contents if callback is omitted (null if the request failed), else undefined.</p>
  98. </div>
  99. <dl>
  100. <dt>
  101. Type
  102. </dt>
  103. <dd>
  104. <span class="param-type">string</span>
  105. |
  106. <span class="param-type">undefined</span>
  107. </dd>
  108. </dl>
  109. <h4 class="name" id=".toCamelCase"><span class="type-signature">(static) </span>toCamelCase<span class="signature">(str)</span><span class="type-signature"> &rarr; {string}</span></h4>
  110. <div class="description">
  111. <p>Converts a string to camel case.</p>
  112. </div>
  113. <h5>Parameters:</h5>
  114. <table class="params">
  115. <thead>
  116. <tr>
  117. <th>Name</th>
  118. <th>Type</th>
  119. <th class="last">Description</th>
  120. </tr>
  121. </thead>
  122. <tbody>
  123. <tr>
  124. <td class="name"><code>str</code></td>
  125. <td class="type">
  126. <span class="param-type">string</span>
  127. </td>
  128. <td class="description last"></td>
  129. </tr>
  130. </tbody>
  131. </table>
  132. <dl class="details">
  133. <dt class="tag-source">Source:</dt>
  134. <dd class="tag-source"><ul class="dummy"><li>
  135. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line400">line 400</a>
  136. </li></ul></dd>
  137. </dl>
  138. <h5>Returns:</h5>
  139. <dl>
  140. <dt>
  141. Type
  142. </dt>
  143. <dd>
  144. <span class="param-type">string</span>
  145. </dd>
  146. </dl>
  147. <h4 class="name" id=".XHR"><span class="type-signature">(static) </span>XHR<span class="signature">()</span><span class="type-signature"> &rarr; {XMLHttpRequest}</span></h4>
  148. <div class="description">
  149. <p>Constructs a XMLHttpRequest object.</p>
  150. </div>
  151. <dl class="details">
  152. <dt class="tag-source">Source:</dt>
  153. <dd class="tag-source"><ul class="dummy"><li>
  154. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line322">line 322</a>
  155. </li></ul></dd>
  156. </dl>
  157. <h5>Throws:</h5>
  158. <dl>
  159. <dt>
  160. <div class="param-desc">
  161. <p>If XMLHttpRequest is not supported</p>
  162. </div>
  163. </dt>
  164. <dd></dd>
  165. <dt>
  166. <dl>
  167. <dt>
  168. Type
  169. </dt>
  170. <dd>
  171. <span class="param-type">Error</span>
  172. </dd>
  173. </dl>
  174. </dt>
  175. <dd></dd>
  176. </dl>
  177. <h5>Returns:</h5>
  178. <dl>
  179. <dt>
  180. Type
  181. </dt>
  182. <dd>
  183. <span class="param-type">XMLHttpRequest</span>
  184. </dd>
  185. </dl>
  186. </article>
  187. </section>
  188. </div>
  189. <nav>
  190. <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ProtoBuf.Builder.html">Builder</a></li><li><a href="ProtoBuf.Builder.Message.html">Message</a></li><li><a href="ProtoBuf.Builder.Service.html">Service</a></li><li><a href="ProtoBuf.DotProto.Parser.html">Parser</a></li><li><a href="ProtoBuf.DotProto.Tokenizer.html">Tokenizer</a></li><li><a href="ProtoBuf.Map.html">Map</a></li><li><a href="ProtoBuf.Reflect.Element.html">Element</a></li><li><a href="ProtoBuf.Reflect.Enum.html">Enum</a></li><li><a href="ProtoBuf.Reflect.Enum.Value.html">Value</a></li><li><a href="ProtoBuf.Reflect.Extension.html">Extension</a></li><li><a href="ProtoBuf.Reflect.Message.html">Message</a></li><li><a href="ProtoBuf.Reflect.Message.ExtensionField.html">ExtensionField</a></li><li><a href="ProtoBuf.Reflect.Message.Field.html">Field</a></li><li><a href="ProtoBuf.Reflect.Message.OneOf.html">OneOf</a></li><li><a href="ProtoBuf.Reflect.Namespace.html">Namespace</a></li><li><a href="ProtoBuf.Reflect.Service.html">Service</a></li><li><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></li><li><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></li><li><a href="ProtoBuf.Reflect.T.html">T</a></li></ul><h3>Namespaces</h3><ul><li><a href="ProtoBuf.html">ProtoBuf</a></li><li><a href="ProtoBuf.DotProto.html">DotProto</a></li><li><a href="ProtoBuf.Reflect.html">Reflect</a></li><li><a href="ProtoBuf.Util.html">Util</a></li></ul>
  191. </nav>
  192. <br class="clear">
  193. <footer>
  194. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.3</a> on Fri Jan 27 2017 17:03:55 GMT+0100 (Mitteleuropäische Zeit)
  195. </footer>
  196. <script> prettyPrint(); </script>
  197. <script src="scripts/linenumber.js"> </script>
  198. </body>
  199. </html>