{"_id":"ftp-response-parser","_rev":"3813494","name":"ftp-response-parser","description":"Parser for FTP server responses","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"sergi","email":"sergi.mansilla@gmail.com"}],"time":{"modified":"2025-06-05T11:19:08.000Z","created":"2013-11-18T14:10:53.767Z","1.0.1":"2014-09-30T10:33:43.540Z","1.0.0":"2013-11-18T14:10:53.767Z"},"users":{},"author":{"name":"Sergi Mansilla","email":"sergi.mansilla@gmail.com","url":"http://sergimansilla.com"},"repository":{"type":"git","url":"https://github.com/sergi/ftp-response-parser.git"},"versions":{"1.0.1":{"name":"ftp-response-parser","id":"ftp-response-parser","version":"1.0.1","description":"Parser for FTP server responses","keywords":["ftp","response","protocol","files","server","client","async"],"author":{"name":"Sergi Mansilla","email":"sergi.mansilla@gmail.com","url":"http://sergimansilla.com"},"homepage":"https://github.com/sergi/ftp-response-parser","repository":{"type":"git","url":"https://github.com/sergi/ftp-response-parser.git"},"bugs":{"url":"https://github.com/sergi/ftp-response-parser/issues"},"dependencies":{"readable-stream":"^1.0.31"},"devDependencies":{"tape":"~2.1.0","resumer":"~0.0.0"},"main":"./index.js","engines":{"node":">=0.8.0"},"scripts":{"test":"node test.js"},"licenses":[{"type":"MIT","url":"https://github.com/sergi/ftp-response-parser/blob/master/LICENSE"}],"gitHead":"dd0b8982f067a688d6c4827440be756e40a0c183","_id":"ftp-response-parser@1.0.1","_shasum":"3b9d33f8edd5fb8e4700b8f778c462e5b1581f89","_from":".","_npmVersion":"1.4.27","_npmUser":{"name":"sergi","email":"sergi.mansilla@gmail.com"},"maintainers":[{"name":"sergi","email":"sergi.mansilla@gmail.com"}],"dist":{"shasum":"3b9d33f8edd5fb8e4700b8f778c462e5b1581f89","size":41961,"noattachment":false,"key":"/ftp-response-parser/-/ftp-response-parser-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ftp-response-parser/download/ftp-response-parser-1.0.1.tgz"},"directories":{},"publish_time":1412073223540,"_hasShrinkwrap":false,"_cnpm_publish_time":1412073223540,"_cnpmcore_publish_time":"2021-12-16T21:51:38.144Z"},"1.0.0":{"name":"ftp-response-parser","id":"ftp-response-parser","version":"1.0.0","description":"Parser for FTP server responses","keywords":["ftp","response","protocol","files","server","client","async"],"author":{"name":"Sergi Mansilla","email":"sergi.mansilla@gmail.com","url":"http://sergimansilla.com"},"homepage":"https://github.com/sergi/ftp-response-parser","repository":{"type":"git","url":"https://github.com/sergi/ftp-response-parser.git"},"bugs":{"url":"https://github.com/sergi/ftp-response-parser/issues"},"dependencies":{"readable-stream":"~1.1.9"},"devDependencies":{"tape":"~2.1.0","resumer":"~0.0.0"},"main":"./index.js","engines":{"node":">=0.8.0"},"scripts":{"test":"node test.js"},"licenses":[{"type":"MIT","url":"https://github.com/sergi/ftp-response-parser/blob/master/LICENSE"}],"readmeFilename":"README.md","_id":"ftp-response-parser@1.0.0","dist":{"shasum":"3968636b920dbd8ca45635512adacab0a5f3bad0","size":41987,"noattachment":false,"key":"/ftp-response-parser/-/ftp-response-parser-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ftp-response-parser/download/ftp-response-parser-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"sergi","email":"sergi.mansilla@gmail.com"},"maintainers":[{"name":"sergi","email":"sergi.mansilla@gmail.com"}],"directories":{},"publish_time":1384783853767,"_hasShrinkwrap":false,"_cnpm_publish_time":1384783853767,"_cnpmcore_publish_time":"2021-12-16T21:51:38.412Z"}},"readme":"# ftp-response-parser\n\nThis module provides a fast, lightweight streaming parser for FTP response\nformat strings.\n\nGiven a string like this:\n\n```\n211-Features supported:\\n\n EPRT\\n\n EPSV\\n\n MDTM\\n\n MLST type*;perm*;size*;modify*;unique*;unix.mode;unix.uid;unix.gid;\\n\n REST STREAM\\n\n SIZE\\n\n TVFS\\n\n UTF8\\n\n211 End FEAT.\\n\n215 UNIX Type: L8\\n\n331 Username ok, send password.\\n\n230 Login successful.\\n\n200 Type set to: Binary.\\n\n250 \"/test\" is the current directory.\\n\n```\n\nit will stream the following objects:\n\n```javascript\n{\n  code: 211,\n  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.',\n  isMark: false,\n  isError: false\n}\n{\n  code: 215,\n  text: '215 UNIX Type: L8',\n  isMark: false,\n  isError: false\n}\n{\n  code: 331,\n  text: '331 Username ok, send password.',\n  isMark: false,\n  isError: false\n}\n{\n  code: 230,\n  text: '230 Login successful.',\n  isMark: false,\n  isError: false\n}\n{\n  code: 200,\n  text: '200 Type set to: Binary.',\n  isMark: false,\n  isError: false\n}\n{\n  code: 250,\n  text: '250 \"/test\" is the current directory.',\n  isMark: false,\n  isError: false\n}\n```\n\n## Usage\n\n```javascript\n\nvar ResponseParser = require('ftp-response-parser');\n\nvar myParser = new ResponseParser();\n\nmyParser.on('readable', function() {\n  var line;\n  while (line = myParser.read()) {\n    console.log(line.code); // will emit 215\n  }\n});\n\nmyParser.write('215 UNIX Type: L8');\n\n```\n\n## Install\n\nTo get the module, with [npm](https://npmjs.org) do:\n\n```\nnpm install ftp-response-parser\n```\n\n## Test\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm test\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/sergi/ftp-response-parser","bugs":{"url":"https://github.com/sergi/ftp-response-parser/issues"}}