index.js.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <title>Code coverage report for lib/index.js</title>
  5. <meta charset="utf-8">
  6. <link rel="stylesheet" href="../prettify.css">
  7. <style>
  8. body, html {
  9. margin:0; padding: 0;
  10. }
  11. body {
  12. font-family: Helvetica Neue, Helvetica,Arial;
  13. font-size: 10pt;
  14. }
  15. div.header, div.footer {
  16. background: #eee;
  17. padding: 1em;
  18. }
  19. div.header {
  20. z-index: 100;
  21. position: fixed;
  22. top: 0;
  23. border-bottom: 1px solid #666;
  24. width: 100%;
  25. }
  26. div.footer {
  27. border-top: 1px solid #666;
  28. }
  29. div.body {
  30. margin-top: 10em;
  31. }
  32. div.meta {
  33. font-size: 90%;
  34. text-align: center;
  35. }
  36. h1, h2, h3 {
  37. font-weight: normal;
  38. }
  39. h1 {
  40. font-size: 12pt;
  41. }
  42. h2 {
  43. font-size: 10pt;
  44. }
  45. pre {
  46. font-family: Consolas, Menlo, Monaco, monospace;
  47. margin: 0;
  48. padding: 0;
  49. line-height: 14px;
  50. font-size: 14px;
  51. -moz-tab-size: 2;
  52. -o-tab-size: 2;
  53. tab-size: 2;
  54. }
  55. div.path { font-size: 110%; }
  56. div.path a:link, div.path a:visited { color: #000; }
  57. table.coverage { border-collapse: collapse; margin:0; padding: 0 }
  58. table.coverage td {
  59. margin: 0;
  60. padding: 0;
  61. color: #111;
  62. vertical-align: top;
  63. }
  64. table.coverage td.line-count {
  65. width: 50px;
  66. text-align: right;
  67. padding-right: 5px;
  68. }
  69. table.coverage td.line-coverage {
  70. color: #777 !important;
  71. text-align: right;
  72. border-left: 1px solid #666;
  73. border-right: 1px solid #666;
  74. }
  75. table.coverage td.text {
  76. }
  77. table.coverage td span.cline-any {
  78. display: inline-block;
  79. padding: 0 5px;
  80. width: 40px;
  81. }
  82. table.coverage td span.cline-neutral {
  83. background: #eee;
  84. }
  85. table.coverage td span.cline-yes {
  86. background: #b5d592;
  87. color: #999;
  88. }
  89. table.coverage td span.cline-no {
  90. background: #fc8c84;
  91. }
  92. .cstat-yes { color: #111; }
  93. .cstat-no { background: #fc8c84; color: #111; }
  94. .fstat-no { background: #ffc520; color: #111 !important; }
  95. .cbranch-no { background: yellow !important; color: #111; }
  96. .cstat-skip { background: #ddd; color: #111; }
  97. .fstat-skip { background: #ddd; color: #111 !important; }
  98. .cbranch-skip { background: #ddd !important; color: #111; }
  99. .missing-if-branch {
  100. display: inline-block;
  101. margin-right: 10px;
  102. position: relative;
  103. padding: 0 4px;
  104. background: black;
  105. color: yellow;
  106. }
  107. .skip-if-branch {
  108. display: none;
  109. margin-right: 10px;
  110. position: relative;
  111. padding: 0 4px;
  112. background: #ccc;
  113. color: white;
  114. }
  115. .missing-if-branch .typ, .skip-if-branch .typ {
  116. color: inherit !important;
  117. }
  118. .entity, .metric { font-weight: bold; }
  119. .metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; }
  120. .metric small { font-size: 80%; font-weight: normal; color: #666; }
  121. div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; }
  122. div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; }
  123. div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; }
  124. div.coverage-summary th.file { border-right: none !important; }
  125. div.coverage-summary th.pic { border-left: none !important; text-align: right; }
  126. div.coverage-summary th.pct { border-right: none !important; }
  127. div.coverage-summary th.abs { border-left: none !important; text-align: right; }
  128. div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; }
  129. div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; }
  130. div.coverage-summary td.file { text-align: right; border-left: 1px solid #666; white-space: nowrap; }
  131. div.coverage-summary td.pic { min-width: 120px !important; }
  132. div.coverage-summary a:link { text-decoration: none; color: #000; }
  133. div.coverage-summary a:visited { text-decoration: none; color: #333; }
  134. div.coverage-summary a:hover { text-decoration: underline; }
  135. div.coverage-summary tfoot td { border-top: 1px solid #666; }
  136. div.coverage-summary .yui3-datatable-sort-indicator, div.coverage-summary .dummy-sort-indicator {
  137. height: 10px;
  138. width: 7px;
  139. display: inline-block;
  140. margin-left: 0.5em;
  141. }
  142. div.coverage-summary .yui3-datatable-sort-indicator {
  143. background: url("https://yui-s.yahooapis.com/3.6.0/build/datatable-sort/assets/skins/sam/sort-arrow-sprite.png") no-repeat scroll 0 0 transparent;
  144. }
  145. div.coverage-summary .yui3-datatable-sorted .yui3-datatable-sort-indicator {
  146. background-position: 0 -20px;
  147. }
  148. div.coverage-summary .yui3-datatable-sorted-desc .yui3-datatable-sort-indicator {
  149. background-position: 0 -10px;
  150. }
  151. .high { background: #b5d592 !important; }
  152. .medium { background: #ffe87c !important; }
  153. .low { background: #fc8c84 !important; }
  154. span.cover-fill, span.cover-empty {
  155. display:inline-block;
  156. border:1px solid #444;
  157. background: white;
  158. height: 12px;
  159. }
  160. span.cover-fill {
  161. background: #ccc;
  162. border-right: 1px solid #444;
  163. }
  164. span.cover-empty {
  165. background: white;
  166. border-left: none;
  167. }
  168. span.cover-full {
  169. border-right: none !important;
  170. }
  171. pre.prettyprint {
  172. border: none !important;
  173. padding: 0 !important;
  174. margin: 0 !important;
  175. }
  176. .com { color: #999 !important; }
  177. .ignore-none { color: #999; font-weight: normal; }
  178. </style>
  179. </head>
  180. <body>
  181. <div class="header high">
  182. <h1>Code coverage report for <span class="entity">lib/index.js</span></h1>
  183. <h2>
  184. Statements: <span class="metric">100% <small>(13 / 13)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
  185. Branches: <span class="metric">100% <small>(4 / 4)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
  186. Functions: <span class="metric">100% <small>(1 / 1)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
  187. Lines: <span class="metric">100% <small>(13 / 13)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
  188. Ignored: <span class="metric">1 branch</span> &nbsp;&nbsp;&nbsp;&nbsp;
  189. </h2>
  190. <div class="path"><a href="../index.html">All files</a> &#187; <a href="index.html">lib/</a> &#187; index.js</div>
  191. </div>
  192. <div class="body">
  193. <pre><table class="coverage">
  194. <tr><td class="line-count">1
  195. 2
  196. 3
  197. 4
  198. 5
  199. 6
  200. 7
  201. 8
  202. 9
  203. 10
  204. 11
  205. 12
  206. 13
  207. 14
  208. 15
  209. 16
  210. 17
  211. 18
  212. 19
  213. 20
  214. 21
  215. 22
  216. 23
  217. 24
  218. 25
  219. 26
  220. 27</td><td class="line-coverage"><span class="cline-any cline-neutral">&nbsp;</span>
  221. <span class="cline-any cline-neutral">&nbsp;</span>
  222. <span class="cline-any cline-neutral">&nbsp;</span>
  223. <span class="cline-any cline-neutral">&nbsp;</span>
  224. <span class="cline-any cline-neutral">&nbsp;</span>
  225. <span class="cline-any cline-yes">1</span>
  226. <span class="cline-any cline-neutral">&nbsp;</span>
  227. <span class="cline-any cline-yes">1</span>
  228. <span class="cline-any cline-neutral">&nbsp;</span>
  229. <span class="cline-any cline-yes">1</span>
  230. <span class="cline-any cline-yes">1</span>
  231. <span class="cline-any cline-yes">1</span>
  232. <span class="cline-any cline-neutral">&nbsp;</span>
  233. <span class="cline-any cline-yes">1</span>
  234. <span class="cline-any cline-neutral">&nbsp;</span>
  235. <span class="cline-any cline-neutral">&nbsp;</span>
  236. <span class="cline-any cline-neutral">&nbsp;</span>
  237. <span class="cline-any cline-yes">1</span>
  238. <span class="cline-any cline-yes">1</span>
  239. <span class="cline-any cline-yes">2</span>
  240. <span class="cline-any cline-yes">2</span>
  241. <span class="cline-any cline-yes">2</span>
  242. <span class="cline-any cline-neutral">&nbsp;</span>
  243. <span class="cline-any cline-yes">1</span>
  244. <span class="cline-any cline-yes">1</span>
  245. <span class="cline-any cline-neutral">&nbsp;</span>
  246. <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// USAGE:
  247. // var handlebars = require('handlebars');
  248. &nbsp;
  249. // var local = handlebars.create();
  250. &nbsp;
  251. var handlebars = require('../dist/cjs/handlebars')["default"];
  252. &nbsp;
  253. handlebars.Visitor = require('../dist/cjs/handlebars/compiler/visitor')["default"];
  254. &nbsp;
  255. var printer = require('../dist/cjs/handlebars/compiler/printer');
  256. handlebars.PrintVisitor = printer.PrintVisitor;
  257. handlebars.print = printer.print;
  258. &nbsp;
  259. module.exports = handlebars;
  260. &nbsp;
  261. // Publish a Node.js require() handler for .handlebars and .hbs files
  262. /* istanbul ignore else */
  263. <span class="skip-if-branch" title="else path not taken" >E</span>if (typeof require !== 'undefined' &amp;&amp; require.extensions) {
  264. var extension = function(module, filename) {
  265. var fs = require("fs");
  266. var templateString = fs.readFileSync(filename, "utf8");
  267. module.exports = handlebars.compile(templateString);
  268. };
  269. require.extensions[".handlebars"] = extension;
  270. require.extensions[".hbs"] = extension;
  271. }
  272. &nbsp;</pre></td></tr>
  273. </table></pre>
  274. </div>
  275. <div class="footer">
  276. <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Sep 01 2014 21:28:55 GMT-0500 (CDT)</div>
  277. </div>
  278. <script src="../prettify.js"></script>
  279. <script src="https://yui-s.yahooapis.com/3.6.0/build/yui/yui-min.js"></script>
  280. <script>
  281. YUI().use('datatable', function (Y) {
  282. var formatters = {
  283. pct: function (o) {
  284. o.className += o.record.get('classes')[o.column.key];
  285. try {
  286. return o.value.toFixed(2) + '%';
  287. } catch (ex) { return o.value + '%'; }
  288. },
  289. html: function (o) {
  290. o.className += o.record.get('classes')[o.column.key];
  291. return o.record.get(o.column.key + '_html');
  292. }
  293. },
  294. defaultFormatter = function (o) {
  295. o.className += o.record.get('classes')[o.column.key];
  296. return o.value;
  297. };
  298. function getColumns(theadNode) {
  299. var colNodes = theadNode.all('tr th'),
  300. cols = [],
  301. col;
  302. colNodes.each(function (colNode) {
  303. col = {
  304. key: colNode.getAttribute('data-col'),
  305. label: colNode.get('innerHTML') || ' ',
  306. sortable: !colNode.getAttribute('data-nosort'),
  307. className: colNode.getAttribute('class'),
  308. type: colNode.getAttribute('data-type'),
  309. allowHTML: colNode.getAttribute('data-html') === 'true' || colNode.getAttribute('data-fmt') === 'html'
  310. };
  311. col.formatter = formatters[colNode.getAttribute('data-fmt')] || defaultFormatter;
  312. cols.push(col);
  313. });
  314. return cols;
  315. }
  316. function getRowData(trNode, cols) {
  317. var tdNodes = trNode.all('td'),
  318. i,
  319. row = { classes: {} },
  320. node,
  321. name;
  322. for (i = 0; i < cols.length; i += 1) {
  323. name = cols[i].key;
  324. node = tdNodes.item(i);
  325. row[name] = node.getAttribute('data-value') || node.get('innerHTML');
  326. row[name + '_html'] = node.get('innerHTML');
  327. row.classes[name] = node.getAttribute('class');
  328. //Y.log('Name: ' + name + '; Value: ' + row[name]);
  329. if (cols[i].type === 'number') { row[name] = row[name] * 1; }
  330. }
  331. //Y.log(row);
  332. return row;
  333. }
  334. function getData(tbodyNode, cols) {
  335. var data = [];
  336. tbodyNode.all('tr').each(function (trNode) {
  337. data.push(getRowData(trNode, cols));
  338. });
  339. return data;
  340. }
  341. function replaceTable(node) {
  342. if (!node) { return; }
  343. var cols = getColumns(node.one('thead')),
  344. data = getData(node.one('tbody'), cols),
  345. table,
  346. parent = node.get('parentNode');
  347. table = new Y.DataTable({
  348. columns: cols,
  349. data: data,
  350. sortBy: 'file'
  351. });
  352. parent.set('innerHTML', '');
  353. table.render(parent);
  354. }
  355. Y.on('domready', function () {
  356. replaceTable(Y.one('div.coverage-summary table'));
  357. if (typeof prettyPrint === 'function') {
  358. prettyPrint();
  359. }
  360. });
  361. });
  362. </script>
  363. </body>
  364. </html>