{"id":21069682,"url":"https://github.com/dailyrandomphoto/export-lazy-prop","last_synced_at":"2025-08-02T13:40:50.563Z","repository":{"id":143878681,"uuid":"280052811","full_name":"dailyrandomphoto/export-lazy-prop","owner":"dailyrandomphoto","description":"Exporting values that will import lazily.","archived":false,"fork":false,"pushed_at":"2020-08-05T06:08:19.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T03:29:28.535Z","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/dailyrandomphoto.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-16T04:27:01.000Z","updated_at":"2020-08-05T06:08:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"50f61a48-3045-4a53-bce7-58a5fd2c35dd","html_url":"https://github.com/dailyrandomphoto/export-lazy-prop","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dailyrandomphoto/export-lazy-prop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dailyrandomphoto%2Fexport-lazy-prop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dailyrandomphoto%2Fexport-lazy-prop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dailyrandomphoto%2Fexport-lazy-prop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dailyrandomphoto%2Fexport-lazy-prop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dailyrandomphoto","download_url":"https://codeload.github.com/dailyrandomphoto/export-lazy-prop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dailyrandomphoto%2Fexport-lazy-prop/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268400668,"owners_count":24244445,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-11-19T18:36:37.054Z","updated_at":"2025-08-02T13:40:50.500Z","avatar_url":"https://github.com/dailyrandomphoto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# export-lazy-prop\n\n[![NPM Version][npm-version-image]][npm-url]\n[![LICENSE][license-image]][license-url]\n[![Build Status][travis-image]][travis-url]\n[![code style: prettier][code-style-prettier-image]][code-style-prettier-url]\n\nExport a [lazily evaluated](https://en.wikipedia.org/wiki/Lazy_evaluation) property.\n\n## Installation\n\n```sh\nnpm install export-lazy-prop\n```\n\n## Usages\n\n```js\n// util/index.js\nexports.foo = require(\"./foo\");\nexports.bar = require(\"./bar\");\n\n// some.js\nconst util = require(\"./util\");\n// foo.js and bar.js are loaded\n\nutil.foo();\n```\n\nIn this case, even if `bar.js` is not used, it will still be loaded from the file system.\n\nWith `export-lazy-prop`, modules will be loaded on demand.\n\n```js\n// util/index.js\nconst exportLazyProp = require(\"export-lazy-prop\");\nexportLazyProp(exports, \"foo\", () =\u003e require(\"./foo\"));\nexportLazyProp(exports, \"bar\", () =\u003e require(\"./bar\"));\n\n// some.js\nconst util = require(\"./util\");\n// will not load foo.js and bar.js\n\nutil.foo();\n// foo.js is loaded\n```\n\nOr\n\n```js\n// util/index.js\nconst exportLazyProp = require(\"export-lazy-prop\");\nexportLazyProp(exports, {\n  foo: () =\u003e require(\"./foo\"),\n  bar: () =\u003e require(\"./bar\"),\n});\n```\n\n## Related\n\n- [define-lazy-prop](https://github.com/sindresorhus/define-lazy-prop) - Define a lazily evaluated property on an object\n- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily\n\n## License\n\nCopyright (c) 2019 [dailyrandomphoto][my-url]. Licensed under the [MIT license][license-url].\n\n[my-url]: https://github.com/dailyrandomphoto\n[npm-url]: https://www.npmjs.com/package/export-lazy-prop\n[travis-url]: https://travis-ci.org/dailyrandomphoto/export-lazy-prop\n[license-url]: LICENSE\n[code-style-prettier-url]: https://github.com/prettier/prettier\n[npm-downloads-image]: https://img.shields.io/npm/dm/export-lazy-prop\n[npm-version-image]: https://img.shields.io/npm/v/export-lazy-prop\n[license-image]: https://img.shields.io/npm/l/export-lazy-prop\n[travis-image]: https://img.shields.io/travis/dailyrandomphoto/export-lazy-prop\n[code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdailyrandomphoto%2Fexport-lazy-prop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdailyrandomphoto%2Fexport-lazy-prop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdailyrandomphoto%2Fexport-lazy-prop/lists"}