{"id":24987435,"url":"https://github.com/sergi/ftp-response-parser","last_synced_at":"2025-04-11T23:41:05.159Z","repository":{"id":11911468,"uuid":"14476306","full_name":"sergi/ftp-response-parser","owner":"sergi","description":"Streaming parser for FTP responses","archived":false,"fork":false,"pushed_at":"2014-09-30T10:33:27.000Z","size":155,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T00:35:55.236Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-17T22:13:50.000Z","updated_at":"2016-10-21T05:56:39.000Z","dependencies_parsed_at":"2022-09-18T03:41:30.238Z","dependency_job_id":null,"html_url":"https://github.com/sergi/ftp-response-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergi%2Fftp-response-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergi%2Fftp-response-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergi%2Fftp-response-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergi%2Fftp-response-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergi","download_url":"https://codeload.github.com/sergi/ftp-response-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045222,"owners_count":21038553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-04T11:42:59.646Z","updated_at":"2025-04-11T23:41:05.137Z","avatar_url":"https://github.com/sergi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergi%2Fftp-response-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergi%2Fftp-response-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergi%2Fftp-response-parser/lists"}