{"id":15117218,"url":"https://github.com/coderaiser/readify","last_synced_at":"2025-07-01T23:07:25.373Z","repository":{"id":19874853,"uuid":"23138776","full_name":"coderaiser/readify","owner":"coderaiser","description":"Read directory content with file attributes: size, date, owner, mode","archived":false,"fork":false,"pushed_at":"2024-12-15T18:25:59.000Z","size":1851,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-02T01:41:14.411Z","etag":null,"topics":["cloudcmd","date","directory","javascript","nodejs","owner","readdir","size","sorting"],"latest_commit_sha":null,"homepage":"","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/coderaiser.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-20T06:43:36.000Z","updated_at":"2024-12-15T18:26:03.000Z","dependencies_parsed_at":"2024-06-18T20:03:43.172Z","dependency_job_id":"f62d90f3-e0c4-4bcc-aa15-0cb2a319e5a0","html_url":"https://github.com/coderaiser/readify","commit_stats":{"total_commits":358,"total_committers":6,"mean_commits":"59.666666666666664","dds":0.2988826815642458,"last_synced_commit":"dbf58a4c48b024acb71c5b47027d29fae466c352"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"purl":"pkg:github/coderaiser/readify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Freadify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Freadify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Freadify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Freadify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderaiser","download_url":"https://codeload.github.com/coderaiser/readify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Freadify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260189722,"owners_count":22972039,"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":["cloudcmd","date","directory","javascript","nodejs","owner","readdir","size","sorting"],"created_at":"2024-09-26T01:45:52.183Z","updated_at":"2025-07-01T23:07:25.282Z","avatar_url":"https://github.com/coderaiser.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Readify [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/readify.svg?style=flat\n[BuildStatusURL]: https://github.com/coderaiser/readify/actions?query=workflow%3A%22Node+CI%22 \"Build Status\"\n[BuildStatusIMGURL]: https://github.com/coderaiser/readify/workflows/Node%20CI/badge.svg\n[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat\n[NPMURL]: https://npmjs.org/package/readify \"npm\"\n[LicenseURL]: https://tldrlegal.com/license/mit-license \"MIT License\"\n[CoverageURL]: https://coveralls.io/github/coderaiser/readify?branch=master\n[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/readify/badge.svg?branch=master\u0026service=github\n\nRead directory content with file attributes: size, date, owner, mode and type.\n\n## Install\n\nWith npm:\n\n```\nnpm i readify\n```\n\n## API\n\n### readify(dir [, options, ])\n\n- **dir** - path of a directory\n- **options** - `object` can contain:\n  - `type` - type of result, could be \"raw\"\n  - `sort` - sort by: name, size, date\n  - `order` - \"asc\" or \"desc\" for ascending and descending order (default: \"asc\")\n\n## Examples\n\n```js\nconst readify = require('readify');\nconst tryToCatch = require('try-to-catch');\n\nconst [error, data] = await tryToCatch(readify, '/');\nconsole.log(data);\n// output\n({\n    path: '/',\n    files: [{\n        name: 'readify.js',\n        size: '4.22kb',\n        date: '20.02.2016',\n        owner: 'coderaiser',\n        mode: 'rw- rw- r--',\n        type: 'file',\n    }],\n});\n\nreadify('/', {\n    type: 'raw',\n}).then(console.log);\n\n// output\n({\n    path: '/',\n    files: [{\n        name: 'readify.js',\n        size: 4735,\n        date: '2016-11-21T13:37:55.275Z',\n        owner: 1000,\n        mode: 33_204,\n        type: 'file',\n    }],\n});\n\nreadify('/', {\n    type: 'raw',\n    sort: 'size',\n    order: 'desc',\n}).then(console.log);\n\n// output\n({\n    path: '/',\n    files: [{\n        name: 'readify.js',\n        size: 4735,\n        date: '2016-11-21T13:37:55.275Z',\n        owner: 1000,\n        mode: 33_204,\n        type: 'file',\n    }],\n});\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderaiser%2Freadify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderaiser%2Freadify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderaiser%2Freadify/lists"}