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MAAQ,IACxB,WACA,EAAO,sDAAwD,EAAO,EACtE,MACA,KAAK,IACT,EAGA,EAAQ,YAAc,EACtB,EAAQ,eAAiB,CAEzB","file":"/npm/doc@0.0.3/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/doc@0.0.3/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint asi: true undef: true es5: true node: true devel: true\n         forin: true latedef: false supernew: true */\n/*global define: true */\n\n!(typeof(define) !== \"function\" ? function($) { $(typeof(require) !== 'function' ? (function() { throw Error('require unsupported'); }) : require, typeof(exports) === 'undefined' ? this : exports, typeof(module) === 'undefined' ? {} : module); } : define)(function(require, exports, module) {\n\n\"use strict\";\n\nfunction extractDocs(source, value) {\n  doc: \"Extracts documentation from the give `source` function\"\n\n  var docs\n  value = value || ''\n\n  if (!source) return value\n  if (typeof(source.doc) === 'function') return extractDocs(source.doc)\n  if (typeof(source.doc) === 'string') return source.doc\n\n  if ((docs = /doc\\:\\s*([\\s\\S]*?)(\\n(?!(\\s*\\|)))/.exec(String(source)))) {\n    value = !docs[1] ? value : docs[1].split(/\\n\\s*\\||\\|/g).map(function($) {\n      return $.replace(/^\\s*['|\"]([\\s\\S]*?)['|\"]\\s*;*$/, \"$1\") || $\n    }).join('\\n')\n  } else if ((docs = /\\{\\s*\\/\\*\\*\\n*([\\s\\S]*)?\\*\\*\\//.exec(String(source)))) {\n    var indent = /^\\s*/.exec(docs[1])[0].length\n    value = docs[1].split('\\n').map(function($) {\n      return $.substr(indent)\n    }).join('\\n')\n  }\n\n  return value\n}\n\nfunction extractArgs(source) {\n  doc: \"Extracts documentanion from the given `source` function\"\n\n  var declaration, names, arity = source.length, index = 0\n\n  declaration = /\\(([\\s\\S]*?)\\)/.exec(source)[1].trim()\n  names = declaration ? declaration.split(/\\s*,\\s*/) : []\n\n  while (++index <= arity) names[index - 1] = names[index - 1] || '$' + index\n\n  return names\n}\n\nfunction doc(source) {\n  doc: \"Prints documentanion of the given function\"\n\n  var docs = extractDocs(source)\n  var args = extractArgs(source)\n  var name = source.displayName || source.name\n\n  console.log([\n    '\\n',\n    'function ',\n    name,\n    '(' + args.join(', ') + ')',\n    ' { ... }',\n    docs ? '\\n-----------------------------------------------\\n' + docs : docs,\n    '\\n'\n  ].join(''))\n}\n\nexports.doc = doc\nexports.docAsString = extractDocs\nexports.docArgsAsArray = extractArgs\n\n});\n"]}