404

[ Avaa Bypassed ]




Upload:

Command:

botdev@13.59.225.66: ~ $
'use strict'

const getIndent = (indent) => {
  return typeof indent === 'number' ? ' '.repeat(indent) : indent
}

module.exports = exports = function stringify (arg, opts) {
  if (Array.isArray(arg)) {
    return stringifyBlocks(arg, opts)
  }
  if (arg && typeof arg === 'object') {
    if ('tag' in arg) {
      return stringifyTag(arg, opts)
    }
    if ('tags' in arg) {
      return stringifyBlock(arg, opts)
    }
  }
  throw new TypeError('Unexpected argument passed to `stringify`.')
}

const stringifyBlocks = exports.stringifyBlocks = function stringifyBlocks (
  blocks, { indent = '' } = {}
) {
  const indnt = getIndent(indent)
  return blocks.reduce((s, block) => {
    return s + stringifyBlock(block, { indent })
  }, (indnt ? indnt.slice(0, -1) : '') + '/**\n') + indnt + '*/'
}

const stringifyBlock = exports.stringifyBlock = function stringifyBlock (
  block, { indent = '' } = {}
) {
  // block.line
  const indnt = getIndent(indent)

  return (
    block.description
      ? block.description.replace(/^\n/, '').replace(/^(.*)\n?/gm, (n0, descLine) => {
        return `${indnt}*${descLine ? ` ${descLine}` : ''}\n`
      })
      : ''
  ) + block.tags.reduce((s, tag) => {
    return s + stringifyTag(tag, { indent })
  }, '')
}

const stringifyTag = exports.stringifyTag = function stringifyTag (
  tag, { indent = '' } = {}
) {
  const indnt = getIndent(indent)
  const {
    type, name, optional, description, tag: tagName, default: deflt //, line , source
  } = tag

  return indnt + `* @${tagName}` +
    (type ? ` {${type}}` : '') +
    (name.trim() ? ` ${
      optional ? '[' : ''
    }${name.trimRight()}${deflt !== undefined ? `=${deflt}` : ''}${
      optional ? ']' : ''
    }` : '') +
    (description ? ` ${description.replace(/\n/g, '\n' + indnt + '* ')}` : '') + '\n'
}

Filemanager

Name Type Size Permission Actions
.github Folder 0755
.vscode Folder 0755
.editorconfig File 243 B 0644
.eslintignore File 15 B 0644
.eslintrc.json File 142 B 0644
CHANGELOG.md File 2.34 KB 0644
LICENSE File 1.06 KB 0644
README.md File 7.42 KB 0644
index.d.ts File 7.26 KB 0644
index.js File 1.2 KB 0644
package.json File 2 KB 0644
parser.js File 7.21 KB 0644
parsers.js File 2.85 KB 0644
stringifier.js File 1.77 KB 0644