{"id":16847514,"url":"https://github.com/fabiosantoscode/user-async-function","last_synced_at":"2025-03-18T07:17:22.957Z","repository":{"id":48032423,"uuid":"141166194","full_name":"fabiosantoscode/user-async-function","owner":"fabiosantoscode","description":"Take async functions from user code, whether they're promise-returning functions, callback-calling functions, or async/await functions","archived":false,"fork":false,"pushed_at":"2022-12-08T03:19:53.000Z","size":225,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T09:15:57.470Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabiosantoscode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-16T16:42:39.000Z","updated_at":"2018-10-21T22:17:37.000Z","dependencies_parsed_at":"2023-01-24T07:25:13.073Z","dependency_job_id":null,"html_url":"https://github.com/fabiosantoscode/user-async-function","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fuser-async-function","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fuser-async-function/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fuser-async-function/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fuser-async-function/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiosantoscode","download_url":"https://codeload.github.com/fabiosantoscode/user-async-function/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244173553,"owners_count":20410300,"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-13T13:08:14.126Z","updated_at":"2025-03-18T07:17:22.924Z","avatar_url":"https://github.com/fabiosantoscode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# user-async-function\n\n[![Build Status](https://travis-ci.org/fabiosantoscode/user-async-function.svg?branch=master)](https://travis-ci.org/fabiosantoscode/user-async-function) [![Coverage Status](https://coveralls.io/repos/github/fabiosantoscode/user-async-function/badge.svg?branch=master)](https://coveralls.io/github/fabiosantoscode/user-async-function?branch=master)\n\nThis module exports a function that calls a user function and waits for its completion. This function can be a callback-calling function, an async/await function, or a promise-returning function.\n\n## How to use\n\n```javascript\nconst userAsyncFunction = require('user-async-function')\n\n// somewhere in your code...\nfunction someFunction(userOptions) {\n  userAsyncFunction(userOptions.someAsyncFunction).then(...)\n}\n\n// or in an async function\nasync function someFunction(userOptions) {\n  await userAsyncFunction(userOptions.someAsyncFunction)\n}\n\n// Pass extra arguments at will\n// They will be passed to the user function (before the callback)\nuserAsyncFunction(fn, 'arg1', 'arg2'/*, ...*/)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiosantoscode%2Fuser-async-function","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiosantoscode%2Fuser-async-function","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiosantoscode%2Fuser-async-function/lists"}