{"id":17736638,"url":"https://github.com/parro-it/require-props","last_synced_at":"2025-03-31T19:17:10.283Z","repository":{"id":57354306,"uuid":"45732653","full_name":"parro-it/require-props","owner":"parro-it","description":"Require a set of modules, and add them as properties to target.","archived":false,"fork":false,"pushed_at":"2015-11-10T20:53:56.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-12T01:17:53.323Z","etag":null,"topics":[],"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/parro-it.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":"2015-11-07T10:51:40.000Z","updated_at":"2015-11-07T11:23:40.000Z","dependencies_parsed_at":"2022-09-12T04:01:23.429Z","dependency_job_id":null,"html_url":"https://github.com/parro-it/require-props","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Frequire-props","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Frequire-props/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Frequire-props/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Frequire-props/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parro-it","download_url":"https://codeload.github.com/parro-it/require-props/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523847,"owners_count":20791444,"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":"2024-10-26T00:23:52.574Z","updated_at":"2025-03-31T19:17:10.257Z","avatar_url":"https://github.com/parro-it.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# require-props\n\nRequire a set of modules, and add them as properties to target.\n\n[![NPM module](https://img.shields.io/npm/v/require-props.svg)](https://npmjs.org/package/require-props)\n[![NPM downloads](https://img.shields.io/npm/dt/require-props.svg)](https://npmjs.org/package/require-props)\n\n## Installation\n\n```bash\nnpm install --save require-props\n```\n\n## Usage\n\n```javascript\n  const requireProps = require('require-props')(__dirname);\n  const target = {name:'target'};\n  requireProps(target, ['./fixtures/module1', './fixtures/module-2']);\n  console.dir(target);\n  // { name: 'target', module1: 1, 'module-2': 'target' }\n```\n\nEach required modules must export a function receiving the app instance and returning an object that is then added as a property\non the app instance, named as the modules itself.\n\n## Api\n\nrequireProps(target, modules)\n\n* target: object - object where all properties are created\n* modules: array - list of modules to requires. They could be module names or relative paths.\n\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 Andrea Parodi\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Frequire-props","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparro-it%2Frequire-props","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Frequire-props/lists"}