{"id":22505341,"url":"https://github.com/azer/juxt.js","last_synced_at":"2025-08-03T11:33:10.094Z","repository":{"id":5955995,"uuid":"7177098","full_name":"azer/juxt.js","owner":"azer","description":"Take a set of functions, return a function that is the juxtaposition of those functions.","archived":false,"fork":false,"pushed_at":"2013-05-14T23:42:14.000Z","size":112,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T07:52:05.157Z","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/azer.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":"2012-12-15T07:42:34.000Z","updated_at":"2018-10-04T09:55:14.000Z","dependencies_parsed_at":"2022-09-11T12:22:13.008Z","dependency_job_id":null,"html_url":"https://github.com/azer/juxt.js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/azer/juxt.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fjuxt.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fjuxt.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fjuxt.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fjuxt.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azer","download_url":"https://codeload.github.com/azer/juxt.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fjuxt.js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268537940,"owners_count":24266297,"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-03T02:00:12.545Z","response_time":2577,"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-12-07T00:17:45.450Z","updated_at":"2025-08-03T11:33:09.820Z","avatar_url":"https://github.com/azer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Install\n\n```bash\n$ npm install juxt # or wget https://raw.github.com/azer/juxt.js/master/juxt.js\n```\n\n## Manual\n\nTake a set of functions, return a function that is the juxtaposition of those\nfunctions. The returned function takes a variable number of arguments and\nreturns a list containing the result of applying each fn to the arguments.\n\n```javascript\nfunction inc1(n) { return n+1 };\nfunction inc2(n) { return n+2 };\nfunction inc3(n) { return n+3 };\n\njuxt(inc1, inc2, inc3)(314); // returns [315, 316, 317]\n```\n\n#### Async\n\n```javascript\njuxt.async(searchGoogle, searchDDG, searchBing)(\"hello world\", function(error,  results){\n  if(error) throw error;\n\n  results[0] // google\n  results[1] // duck duck go\n  results[2] // bing\n});\n```\n\nObjects can be used, as well;\n\n```js\nfunction turkish(word, callback){ /* some magic here */ }\nfunction french(word, callback){ /* some magic here */ }\nfunction polish(word, callback){ /* some magic here */ }\n\njuxt.async({ 'tr': turkish, 'fr': french, 'pl': polish })(\"hello\", function(error,  results){\n  assert.equal(results.tr, \"merhaba\");\n  assert.equal(results.fr, \"bonjour\");\n  assert.equal(results.pl, \"cześć\");\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazer%2Fjuxt.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazer%2Fjuxt.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazer%2Fjuxt.js/lists"}