VimUnDoKzfK~9LK9-w%*lfzzzzR?K_R5_R h1. ftp-respo5_ R # ftp-respo5_R5_R4M7This module provides parsing for standard FTP responses5_;R4T;This module provides a streaming for standard FTP responses5_R4d5_ R4r ## Usage5_ R4 5_ R4## Testo5_ R4 5_ R45_  R5_ npm install catw5_ !R5gDThis module provides a streaming for standard FTP responses strings.5_,R5kKThis module provides a streaming parser for standard FTP responses strings.5_9R5pBThis module provides a streaming parser for FTP responses strings.5_GR6m5_R6Given a string like this:5_3R63Given a string like this (separated by \r\n or \n):5_R6:4 35_R6 { code: 211,5_ VR6 isMark: false, isError: false } { code: 215,5_   VR6  isMark: false, isError: false } { code: 331,5_   VR6  isMark: false, isError: false }5_   VR6  { code: 230,5_   VR6  isMark: false, isError: false }5_   VR6  { code: 200,5_   VR6  isMark: false, isError: false }5_   VR6  { code: 250,5_    VR6  isMark: false, isError: false }5_!  R6 < text: '211-Features supported:\n EPRT\n EPSV\n MDTM\n MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;\n REST STREAM\n SIZE\n TVFS\n UTF8\n211 End FEAT.', text: '215 UNIX Type: L8',* text: '331 Username ok, send password.', text: '230 Login successful.',# text: '200 Type set to: Binary.',8 text: '250 "/test/test_c9" is the current directory.',5_ "! R6 < '211-Features supported:\n EPRT\n EPSV\n MDTM\n MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;\n REST STREAM\n SIZE\n TVFS\n UTF8\n211 End FEAT.', '215 UNIX Type: L8',$ '331 Username ok, send password.', '230 Login successful.', '200 Type set to: Binary.',2 '250 "/test/test_c9" is the current directory.',5_!#" R7 < 211-Features supported:\n EPRT\n EPSV\n MDTM\n MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;\n REST STREAM\n SIZE\n TVFS\n UTF8\n211 End FEAT.', 215 UNIX Type: L8',# 331 Username ok, send password.', 230 Login successful.', 200 Type set to: Binary.',1 250 "/test/test_c9" is the current directory.',5_"$# R7=<5_#%$ R7  =5_$&% R7  >211-Features supported:\n EPRT\n EPSV\n MDTM\n MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;\n REST STREAM\n SIZE\n TVFS\n UTF8\n211 End FEAT.',5_%'& R7' ? EPRT\n EPSV\n MDTM\n MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;\n REST STREAM\n SIZE\n TVFS\n UTF8\n211 End FEAT.',5_&(' R7+ @ EPSV\n MDTM\n MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;\n REST STREAM\n SIZE\n TVFS\n UTF8\n211 End FEAT.',5_')( R7. A MDTM\n MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;\n REST STREAM\n SIZE\n TVFS\n UTF8\n211 End FEAT.',5_(*) GR7V Bx MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;\n REST STREAM\n SIZE\n TVFS\n UTF8\n211 End FEAT.',5_)+* R7Z C2 REST STREAM\n SIZE\n TVFS\n UTF8\n211 End FEAT.',5_*,+R7] D$ SIZE\n TVFS\n UTF8\n211 End FEAT.',5_+-,R7_E TVFS\n UTF8\n211 End FEAT.',5_,.- R7aF UTF8\n211 End FEAT.',5_-/.R7kF UTF8\n211 End FEAT.',5_.0/2R7{G3Given a string like this (separated by \r\n or \n):5_/10R7G211 End FEAT.',5_021R7G215 UNIX Type: L8',5_132!R7G!331 Username ok, send password.',5_243R7G215 UNIX Type: L8'\n5_354R7G211 End FEAT.'\n5_465R7G230 Login successful.',5_576R7G200 Type set to: Binary.',5_687R7G200 Type set to: Binary.5_798/R7G/250 "/test/test_c9" is the current directory.',5_8:9 R7 G MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;\n   MDTM\n   EPSV\n   EPRT\n 5_9;:R7G { code: 211,5_:<;R7!H isError: false }5_;=<!R7 #I { code: 215,5_<>="R7!#J code: 215,5_=?>%R7$'J isError: false }5_>@?R7K will emit the following objects:5_?A@'R7&)K { code: 331,5_@BAR7L5_ACB,R7+.M isError: false }5_BDC1R703N isError: false }5_CED6R758O isError: false }5_DGE;R7:=P isError: false }5_EHFG R8Q/250 "/test/test_c9" is the current directory.\n5_GIH R8Q(250 "/test/" is the current directory.\n5_HJI9R8 8:Q8 text: '250 "/test/test_c9" is the current directory.',5_IKJ9R8 8:Q7 text: '250 "/testtest_c9" is the current directory.',5_JLK9R8 8:Q6 text: '250 "/testest_c9" is the current directory.',5_KML9R8 8:Q5 text: '250 "/testst_c9" is the current directory.',5_LNM9R8 8:Q4 text: '250 "/testt_c9" is the current directory.',5_MON9R8 8:Q3 text: '250 "/test_c9" is the current directory.',5_NPO9R8 8:Q2 text: '250 "/testc9" is the current directory.',5_OQP9R8 8:Q1 text: '250 "/test9" is the current directory.',5_PRQ<R8<>R<>Q5_QSRR8:< isError: false 57 isError: false 02 isError: false +- isError: false '){ %' isError: false !#{ ! isError: false { 5_RTSR8R"will stream the following objects:5_SUT.R:-0R { code: 230,5_TVU4R:36S { code: 200,5_UWV:R:9<T { code: 250,5_VXW.R:9;{ 35{ -/{ 5_WYXAR:@A5_XZYBR:BEUBDT5_Y[ZDDEvR:CEV5_Z\[DDEvR:CEVvar parser = require('ftp-5_[]\D+DEvR:CEWCEV5_\^]E EFvR;EGXEGW5_]_^FEGvR; EGX5_^`_EEHvR; DFY,var parser = require('ftp-response-parser');5__a`E+EHvR>EHZEGY5_`baEEJvR>%DF[,var Parser = require('ftp-response-parser');5_acbE EJvR>,DF[3var Responsearser = require('ftp-response-parser');5_bdcG EJvR>.FJ[ var myParser5_cedIELvR>QHJ]myParser.on('readeable5_dfeIELvR>RHM]myParser.on('readable5_egfKEOvR>sJL`! while(line = myParser.read()) {5_figLEOvR>tKO`5_gjhiMEQvR> LNb}5_ikjNEQvR>NQcNPb5_jlkP$$ v R>OQdmyParser.write(5_kmlP$$ v R>OQdmyParser.write('PQd5_lpmP"$$ v R>OSd"myParser.write('215 UNIX Type: L8'5_mqopR"'V R>RYfRSf5_prqSSXR>SYl code: 215, text: '215 UNIX Type: L8', isMark: false, isError: false}RTl{5_qsrRSXR> QSl// will emit an object5_rtsSXR?lHThis module provides a streaming parser for FTP response format strings.5_sutKSXR?lZThis module provides a fast, lightweight streaming parser for FTP response format strings.5_tvuTYR? KThis module provides a fast, lightweight streaming parser for FTP response 5_uwvSSYVR?.RS// will emit an object like:// {// code: 215,// text: '215 UNIX Type: L8',// isMark: false,// isError: false// }5_vxwSSSVR?/RS5_wyxMSSVR?2LNe console.log(line);5_xzyMSSVR?4 LNe console.log(line.code);5_yzFSSVR?JEGe5_mnpoR'7vR>RSfQSf(// will emit an object215 UNIX Type: L8'5_monR'7vR>QSf// will emit an object:events.EventEmitter.call(this);5_gihNEQvR>MOb });5_EGFR8Q*250 "/test/te" is the current directory.\n5_R5s5