{"id":29189348,"url":"https://github.com/coderaiser/anyorder","last_synced_at":"2025-07-01T23:07:14.949Z","repository":{"id":26401224,"uuid":"29850968","full_name":"coderaiser/anyorder","owner":"coderaiser","description":"Call function with any order of arguments","archived":false,"fork":false,"pushed_at":"2018-02-20T14:21:27.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-26T23:15:29.144Z","etag":null,"topics":["arguments","functional","javascript","order"],"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/coderaiser.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","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-01-26T08:00:19.000Z","updated_at":"2018-02-20T14:22:07.000Z","dependencies_parsed_at":"2022-07-23T17:07:51.447Z","dependency_job_id":null,"html_url":"https://github.com/coderaiser/anyorder","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/coderaiser/anyorder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fanyorder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fanyorder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fanyorder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fanyorder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderaiser","download_url":"https://codeload.github.com/coderaiser/anyorder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fanyorder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262941744,"owners_count":23388163,"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":["arguments","functional","javascript","order"],"created_at":"2025-07-01T23:07:14.075Z","updated_at":"2025-07-01T23:07:14.881Z","avatar_url":"https://github.com/coderaiser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anyorder\n\nCall function with any order of arguments.\n\n## What for?\n\n`Anyorder` could be used when order of parameters need to be other then it is. It's not very common situation, but sometimes it could be useful.\nFor example to avoid [boolean trap](http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html \"hall of api shame: boolean trap\") in `addEventListener`.\n\n## How to use?\nIn `node.js`:\n```js\nconst anyorder = require('anyorder');\nconst fs = require('fs');\nconst read = anyorder('function, string', fs.readFile);\n\nread((error, data) =\u003e {\n    console.log(error || data)\n}, 'README.md');\n```\n\nIn `browser`:\n```js\nconst addListener = window.addEventListener.bind(window);\nconst add = anyorder('string, function, boolean', addListener);\n\nadd('load', true, (event) =\u003e {\n    console.log(event);\n});\n```\n\n## Environments\n\nIn old `node.js` environments that supports `es5` only, `anyorder` could be used with:\n\n```js\nvar anyorder = require('anyorder/legacy');\n```\n\n## License\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderaiser%2Fanyorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderaiser%2Fanyorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderaiser%2Fanyorder/lists"}