!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/rtail-expressjs/node_modules/split/test/   drwxr-xr-x
Free 12.98 GB of 57.97 GB (22.39%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     split.asynct.js (3.45 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
var es = require('event-stream')
  , it = require('it-is').style('colour')
  , d = require('ubelt')
  , split = require('..')
  , join = require('path').join
  , fs = require('fs')
  , Stream = require('stream').Stream
  , Readable = require('stream').Readable
  , spec = require('stream-spec')
  , through = require('through')
  , stringStream = require('string-to-stream')

exports ['split() works like String#split'] = function (test) {
  var readme = join(__filename)
    , expected = fs.readFileSync(readme, 'utf-8').split('\n')
    , cs = split()
    , actual = []
    , ended = false
    , x = spec(cs).through()

  var a = new Stream ()

  a.write = function (l) {
    actual.push(l.trim())
  }
  a.end = function () {

      ended = true
      expected.forEach(function (v,k) {
        //String.split will append an empty string ''
        //if the string ends in a split pattern.
        //es.split doesn't which was breaking this test.
        //clearly, appending the empty string is correct.
        //tests are passing though. which is the current job.
        if(v)
          it(actual[k]).like(v)
      })
      //give the stream time to close
      process.nextTick(function () {
        test.done()
        x.validate()
      })
  }
  a.writable = true

  fs.createReadStream(readme, {flags: 'r'}).pipe(cs)
  cs.pipe(a)

}

exports ['split() takes mapper function'] = function (test) {
  var readme = join(__filename)
    , expected = fs.readFileSync(readme, 'utf-8').split('\n')
    , cs = split(function (line) { return line.toUpperCase() })
    , actual = []
    , ended = false
    , x = spec(cs).through()

  var a = new Stream ()

  a.write = function (l) {
    actual.push(l.trim())
  }
  a.end = function () {

      ended = true
      expected.forEach(function (v,k) {
        //String.split will append an empty string ''
        //if the string ends in a split pattern.
        //es.split doesn't which was breaking this test.
        //clearly, appending the empty string is correct.
        //tests are passing though. which is the current job.
        if(v)
          it(actual[k]).equal(v.trim().toUpperCase())
      })
      //give the stream time to close
      process.nextTick(function () {
        test.done()
        x.validate()
      })
  }
  a.writable = true

  fs.createReadStream(readme, {flags: 'r'}).pipe(cs)
  cs.pipe(a)

}

exports ['split() works with empty string chunks'] = function (test) {
  var str = ' foo'
    , expected = str.split(/[\s]*/).reduce(splitBy(/[\s]*/), [])
    , cs1 = split(/[\s]*/)
    , cs2 = split(/[\s]*/)
    , actual = []
    , ended = false
    , x = spec(cs1).through()
    , y = spec(cs2).through()

  var a = new Stream ()

  a.write = function (l) {
    actual.push(l.trim())
  }
  a.end = function () {

      ended = true
      expected.forEach(function (v,k) {
        //String.split will append an empty string ''
        //if the string ends in a split pattern.
        //es.split doesn't which was breaking this test.
        //clearly, appending the empty string is correct.
        //tests are passing though. which is the current job.
        if(v)
          it(actual[k]).like(v)
      })
      //give the stream time to close
      process.nextTick(function () {
        test.done()
        x.validate()
        y.validate()
      })
  }
  a.writable = true

  cs1.pipe(cs2)
  cs2.pipe(a)

  cs1.write(str)
  cs1.end()

}

function splitBy (delimiter) {
  return function (arr, piece) {
    return arr.concat(piece.split(delimiter))
  }
}

:: 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.0224 ]--