{"library":"parse-listing","title":"parse-listing","description":"Small library to parse file listings (e.g., ls, dir) into JavaScript objects. Currently at v1.1.3, last released in 2018 with a fix for MS-DOS folder names containing numbers. It supports Unix and DOS/Windows formats automatically. The library is stable but in maintenance mode; no new features are expected. Compared to alternatives, it is minimal and has no dependencies.","language":"javascript","status":"maintenance","last_verified":"Sat May 09","install":{"commands":["npm install parse-listing"],"cli":null},"imports":["const Parser = require('parse-listing');","Parser.parseEntries(str, callback);","const entry = Parser.parseEntry(str);"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const Parser = require('parse-listing');\n\nconst unixListing = `drwxr-xr-x    5 1001     1001         4096 Jan 09 11:52 .\ndrwxr-xr-x    4 0        0            4096 Sep 19 13:50 ..\n-rw-------    1 1001     1001         1118 Jan 09 12:09 .bash_history\n-rw-------    1 1001     1001          943 Jan 09 11:52 .viminfo\ndrwxrwxr-x    5 1001     1001         4096 Jan 09 11:52 inaccessible\ndrwxrwxrwx    2 1001     1001         4096 Sep 21 11:20 project1\ndrwx------    2 1001     1001         4096 Oct 19 16:17 project2`;\n\nParser.parseEntries(unixListing, function(err, entries) {\n  if (err) {\n    console.error(err);\n    return;\n  }\n  entries.forEach(function(entry) {\n    console.log('Name:', entry.name, 'Type:', entry.type, 'Size:', entry.size);\n  });\n});","lang":"javascript","description":"Parses a Unix 'ls -la' formatted string into objects, logging name, type, and size for each entry.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}