jsdocs.js

  1. /** ****************************************************************************************************
  2. * @file: jsdocs.js
  3. * @project: template-api
  4. * @author Nick Soggin <iSkore@users.noreply.github.com> on 09-Apr-2018
  5. *******************************************************************************************************/
  6. 'use strict';
  7. /**
  8. * @global
  9. * @typedef {number} milliseconds
  10. * @description
  11. * A number assumed to be in milliseconds.<br/>
  12. * Number is likely to be calculated against a Unix Epoch based timestamp or milliseconds since Jan 01 1970.<br/>
  13. * When multiplied by <code>1e-3</code>, number should convert to seconds
  14. * @mixin
  15. */
  16. /**
  17. * @global
  18. * @typedef {number[]} hrtime
  19. * @description
  20. * A "tuple" assumed to be a result of calling for high resolution time <code>process.hrtime</code><br/>
  21. * typically, a resulting <code>hrtime</code> should be the returned value of
  22. * <code>process.hrtime( process.hrtime() );</code> where the inner <code>hrtime</code>
  23. * is likely called before a function is run to calculate the time it took to run a process.
  24. * tuple is assumed to be in nanoseconds
  25. * @example
  26. * [ 22727, 841838045 ]
  27. * @mixin
  28. */
  29. /**
  30. * @global
  31. * @typedef {number|string} radix
  32. * @property {number} binary - specify 2 to return binary radix value
  33. * @property {number} octal - specify 8 to return octal radix value
  34. * @property {number} base10 - specify 10 to return base10 radix value
  35. * @property {number} hexadecimal - specify 16 to return hexadecimal radix value
  36. * @mixin
  37. */
  38. /**
  39. * @global
  40. * @typedef {number|string} bytes
  41. * @description
  42. * The byte is a unit of digital information that most commonly consists of eight bits.
  43. * Pertains to this application as a number or string expected to be a digital information measurement of "bytes"
  44. *
  45. * Recognized conversion units:
  46. * <table class="params">
  47. * <thead><tr><th>(Unit)</th><th>[Standard Base 10]</th><th>[Digital Storage Unit 2ⁿ]</th></tr></thead>
  48. * <tbody>
  49. * <tr><td>(B)</td><td>Bytes</td><td>Bytes</td></tr>
  50. * <tr><td>(kB|KiB)</td><td>Kilobytes</td><td>Kibibytes</td></tr>
  51. * <tr><td>(mB|MiB)</td><td>Megabytes</td><td>Megibytes</td></tr>
  52. * <tr><td>(gB|GiB)</td><td>Gigabytes</td><td>Gigibytes</td></tr>
  53. * <tr><td>(tB|TiB)</td><td>Terabytes</td><td>Teribytes</td></tr>
  54. * </tbody>
  55. * </table>
  56. *
  57. * @example
  58. * 1 KB <-> 1000
  59. * 1 KiB <-> 1024
  60. * 1 Kilobytes <-> 1000
  61. * 1 Kibibytes <-> 1024
  62. * @mixin
  63. */
  64. /**
  65. * @global
  66. * @typedef {string} uuid
  67. * @description
  68. * UUIDs (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDentifier).
  69. * A UUID is 128 bits long, and can guarantee uniqueness across space and time.
  70. * <a href="https://tools.ietf.org/html/rfc4122">RFC-4122</a>
  71. *
  72. * Assumed to be a hexadecimal string compliant with one of the following:
  73. * <ul>
  74. * <li><a href="https://tools.ietf.org/html/rfc4122#section-4.1.5">Time-Based UUID Version 1</a></li>
  75. * <li><a href="https://tools.ietf.org/html/rfc4122#section-4.3">Name-Based UUID Version 3 & 5</a></li>
  76. * <li><a href="https://tools.ietf.org/html/rfc4122#section-4.4">Truly-Random or Pseudo-Random Version 4</a></li>
  77. * </ul>
  78. * @example
  79. * a0ac3f6e-510e-45d8-b199-07d63f23a011
  80. * @mixin
  81. */
  82. module.exports = {
  83. plugins: [
  84. 'plugins/markdown'
  85. ],
  86. markdown: {
  87. idInHeadings: true
  88. },
  89. recurseDepth: 20,
  90. source: {
  91. include: [
  92. 'README.md',
  93. './'
  94. ],
  95. exclude: [
  96. 'node_modules',
  97. 'test',
  98. 'docs'
  99. ],
  100. includePattern: '.+\\.js(doc|x)?$',
  101. excludePattern: '(^|\\/|\\\\)_'
  102. },
  103. sourceType: 'module',
  104. tags: {
  105. allowUnknownTags: true,
  106. dictionaries: [
  107. 'jsdoc',
  108. 'closure'
  109. ]
  110. },
  111. templates: {
  112. cleverLinks: true,
  113. monospaceLinks: true
  114. },
  115. opts: {
  116. encoding: 'utf8',
  117. destination: 'docs',
  118. recurse: true,
  119. template: './node_modules/postman-jsdoc-theme'
  120. }
  121. };