!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/node-red/node_modules/@prantlf/jsonlint/lib/   drwxr-xr-x
Free 13.02 GB of 57.97 GB (22.46%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     formatter.js (2.59 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
(function (global, factory) {
  // eslint-disable-next-line no-unused-expressions
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports)
  // eslint-disable-next-line no-undef
    : typeof define === 'function' && define.amd ? define('jsonlint-formatter', ['exports'], factory)
    // eslint-disable-next-line no-undef
      : (global = global || self, factory(global.jsonlintFormatter = {}))
}(this, function (exports) {
  'use strict'

  /**
   * Manual formatter taken straight from https://github.com/umbrae/jsonlintdotcom
   *
   * jsl.format - Provide json reformatting in a character-by-character approach,
   *   so that even invalid JSON may be reformatted (to the best of its ability).
   *
   */

  function repeat (s, count) {
    return new Array(count + 1).join(s)
  }

  function format (json, indent) {
    var i = 0
    var length = 0
    var indentString = indent !== undefined
      ? typeof indent === 'number'
        ? new Array(indent + 1).join(' ') : indent : '  '
    var outputString = ''
    var indentLevel = 0
    var inString
    var currentChar

    for (i = 0, length = json.length; i < length; i += 1) {
      currentChar = json.charAt(i)
      switch (currentChar) {
        case '{':
        case '[':
          if (!inString) {
            outputString += currentChar + '\n' + repeat(indentString, indentLevel + 1)
            indentLevel += 1
          } else {
            outputString += currentChar
          }
          break
        case '}':
        case ']':
          if (!inString) {
            indentLevel -= 1
            outputString += '\n' + repeat(indentString, indentLevel) + currentChar
          } else {
            outputString += currentChar
          }
          break
        case ',':
          if (!inString) {
            outputString += ',\n' + repeat(indentString, indentLevel)
          } else {
            outputString += currentChar
          }
          break
        case ':':
          if (!inString) {
            outputString += ': '
          } else {
            outputString += currentChar
          }
          break
        case ' ':
        case '\n':
        case '\t':
          if (inString) {
            outputString += currentChar
          }
          break
        case '"':
          if (i > 0 && json.charAt(i - 1) !== '\\') {
            inString = !inString
          }
          outputString += currentChar
          break
        default:
          outputString += currentChar
          break
      }
    }

    return outputString
  }

  exports.format = format

  Object.defineProperty(exports, '__esModule', { value: true })
}))

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0418 ]--