{"id":15854253,"url":"https://github.com/afeiship/next-try-apply-get","last_synced_at":"2026-04-26T12:32:48.828Z","repository":{"id":57122904,"uuid":"371284599","full_name":"afeiship/next-try-apply-get","owner":"afeiship","description":"Try to get value from target(fn) or target(other data).","archived":false,"fork":false,"pushed_at":"2021-05-27T07:39:13.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-16T19:32:34.054Z","etag":null,"topics":["apply","call","function","get","invoke","next","try"],"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/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-27T07:28:33.000Z","updated_at":"2021-05-27T07:39:15.000Z","dependencies_parsed_at":"2022-08-25T17:11:12.642Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/next-try-apply-get","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/afeiship/next-try-apply-get","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-try-apply-get","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-try-apply-get/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-try-apply-get/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-try-apply-get/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/next-try-apply-get/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-try-apply-get/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32297895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["apply","call","function","get","invoke","next","try"],"created_at":"2024-10-05T19:41:17.942Z","updated_at":"2026-04-26T12:32:48.810Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","readme":"# next-try-apply-get\n\u003e Try to get value from target(fn) or target(other data).\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```bash\nnpm install -S @jswork/next-try-apply-get\n```\n\n## usage\n```js\nimport '@jswork/next-try-apply-get';\n\n// 1. target is function\nconst target1 = (data) =\u003e {\n  return { name: 'fei', ...data };\n};\n\n// 2. target is not a function\nconst target2 = { name: 'aric' };\n\n\n// get the results\nconst res1 = nx.tryApplyGet(target1, [{ github: 'afeiship', hobby: 'coding' }]);\nconst res2 = nx.tryApplyGet(target2);\n\n/*\n// res1\n{\n  name: 'fei',\n  github: 'afeiship',\n  hobby: 'coding'\n}\n\n// res2\n{ name: 'aric' }\n*/\n```\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/next-try-apply-get/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/next-try-apply-get\n[version-url]: https://npmjs.org/package/@jswork/next-try-apply-get\n\n[license-image]: https://img.shields.io/npm/l/@jswork/next-try-apply-get\n[license-url]: https://github.com/afeiship/next-try-apply-get/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-try-apply-get\n[size-url]: https://github.com/afeiship/next-try-apply-get/blob/master/dist/next-try-apply-get.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/next-try-apply-get\n[download-url]: https://www.npmjs.com/package/@jswork/next-try-apply-get\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-try-apply-get","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Fnext-try-apply-get","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-try-apply-get/lists"}