{"id":18763590,"url":"https://github.com/iguntur/lazy-dir","last_synced_at":"2025-12-06T03:30:11.837Z","repository":{"id":57150175,"uuid":"159924584","full_name":"iguntur/lazy-dir","owner":"iguntur","description":"Lazy define current directory","archived":false,"fork":false,"pushed_at":"2018-12-05T19:02:31.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T23:43:08.403Z","etag":null,"topics":["cwd","dir","join","path","pwd","resolve"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/iguntur.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":"2018-12-01T08:30:25.000Z","updated_at":"2018-12-05T19:02:32.000Z","dependencies_parsed_at":"2022-09-03T18:40:52.613Z","dependency_job_id":null,"html_url":"https://github.com/iguntur/lazy-dir","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iguntur%2Flazy-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iguntur%2Flazy-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iguntur%2Flazy-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iguntur%2Flazy-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iguntur","download_url":"https://codeload.github.com/iguntur/lazy-dir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239661824,"owners_count":19676411,"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":["cwd","dir","join","path","pwd","resolve"],"created_at":"2024-11-07T18:26:43.217Z","updated_at":"2025-12-06T03:30:11.500Z","avatar_url":"https://github.com/iguntur.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lazy-dir\n\n\u003e Lazy define current directory\n\n[![Travis CI](https://img.shields.io/travis/iguntur/lazy-dir.svg?style=flat-square)](https://travis-ci.org/iguntur/lazy-dir)\n[![node](https://img.shields.io/node/v/lazy-dir.svg?style=flat-square)]()\n[![npm](https://img.shields.io/npm/v/lazy-dir.svg?style=flat-square)](https://www.npmjs.org/package/lazy-dir)\n[![PRs](https://img.shields.io/badge/PRs-welcome-blue.svg?style=flat-square)]()\n\n---\n\n## Install\n\n```console\n$ npm install lazy-dir\n```\n\n## Usage\n\n```js\nconst dir = require('lazy-dir')(module);\n\nconsole.log(dir.here());\n//=\u003e /path/to/project/awesome\n\nconsole.log(dir.here('foo', 'bar'));\n//=\u003e /path/to/project/awesome/foo/bar\n```\n\n## API\n\n### require('lazy-dir')(`module`);\n\n- Params:\n    - `module`: `\u003cNodeJS.Module\u003e` _(required)_\n- Returns: `\u003cobject\u003e`\n\n#### .pwd(`[...paths]`)\n\n- Params:\n    - `...paths`: `\u003cstring[]\u003e` _(optional)_\n- Returns: `\u003cstring\u003e`\n- Example:\n    ```js\n    dir.pwd('a', 'b', 'c'); // eq: path.resolve(process.cwd(), 'a', 'b', 'c')\n    ```\n\n#### .here(`[...paths]`)\n\n- Params:\n    - `...paths`: `\u003cstring[]\u003e` _(optional)_\n- Returns: `\u003cstring\u003e`\n- Example:\n    ```js\n    dir.here('a', 'b', 'c'); // eq: path.resolve(__dirname, 'a', 'b', 'c')\n    ```\n\n\n## License\n\nMIT © [Guntur Poetra](http://github.com/iguntur)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figuntur%2Flazy-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figuntur%2Flazy-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figuntur%2Flazy-dir/lists"}