{"id":15698963,"url":"https://github.com/doowb/forward-object","last_synced_at":"2025-05-09T02:17:28.312Z","repository":{"id":36037130,"uuid":"40333957","full_name":"doowb/forward-object","owner":"doowb","description":"Copy properties from an object to another object, where properties with function values will be invoked in the context of the provider, and properties with non-function values are just copied.","archived":false,"fork":false,"pushed_at":"2015-10-16T02:59:23.000Z","size":116,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-09T02:17:24.733Z","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/doowb.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-08-07T01:05:05.000Z","updated_at":"2021-04-12T22:08:04.000Z","dependencies_parsed_at":"2022-09-01T18:52:04.220Z","dependency_job_id":null,"html_url":"https://github.com/doowb/forward-object","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/doowb%2Fforward-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fforward-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fforward-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fforward-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/forward-object/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176443,"owners_count":21866143,"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-03T19:36:49.476Z","updated_at":"2025-05-09T02:17:28.290Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# forward-object [![NPM version](https://badge.fury.io/js/forward-object.svg)](http://badge.fury.io/js/forward-object)  [![Build Status](https://travis-ci.org/doowb/forward-object.svg)](https://travis-ci.org/doowb/forward-object)\n\n\u003e Copy properties from an object to another object, where properties with function values will be invoked in the context of the provider, and properties with non-function values are just copied.\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i forward-object --save\n```\n\n## Usage\n\n```js\nvar forwardObject = require('forward-object');\n```\n\n## API\n\n### [forward](index.js#L37)\n\nCopy properties from an object to another object, where properties with function values will be invoked in the context of the provider, and properties with non-function values are just copied.\n\n**Params**\n\n* `receiver` **{Object}**: Object to receive properties.\n* `provider` **{Object}**: Object providing properties.\n* `keys` **{Array}**: Optional array of keys to foward.\n* `returns` **{Object}**: Modified `receiver` object with properties from `provider`\n\n**Example**\n\n```js\nvar receiver = {};\nvar provider = {\n  name: 'provider',\n  upper: function (str) {\n    return '[' + this.name + '] ' + str.toUpperCase();\n  }\n};\nvar receiver = forward(receiver, provider);\nreceiver.name = 'receiver';\nconsole.log(receiver.upper('foo'));\n//=\u003e [provider] FOO\n```\n\n## Related projects\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d \u0026\u0026 npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/doowb/forward-object/issues/new)\n\n## Author\n\n**Brian Woodward**\n\n+ [github/doowb](https://github.com/doowb)\n+ [twitter/doowb](http://twitter.com/doowb)\n\n## License\n\nCopyright © 2015 Brian Woodward\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 07, 2015._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fforward-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Fforward-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fforward-object/lists"}