{"id":18532680,"url":"https://github.com/itwillwork/function-logger","last_synced_at":"2025-05-14T23:08:22.673Z","repository":{"id":57242964,"uuid":"109677091","full_name":"itwillwork/function-logger","owner":"itwillwork","description":"Awesome tool for FP JS. Logging of the input and output arguments of the function on each call.","archived":false,"fork":false,"pushed_at":"2019-03-27T08:38:19.000Z","size":4328,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T18:13:46.733Z","etag":null,"topics":["debugging-tool","frontend","functional-programming","javascript"],"latest_commit_sha":null,"homepage":"","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/itwillwork.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":"2017-11-06T09:55:06.000Z","updated_at":"2019-03-27T08:39:49.000Z","dependencies_parsed_at":"2022-09-15T00:50:40.053Z","dependency_job_id":null,"html_url":"https://github.com/itwillwork/function-logger","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/itwillwork%2Ffunction-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itwillwork%2Ffunction-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itwillwork%2Ffunction-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itwillwork%2Ffunction-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itwillwork","download_url":"https://codeload.github.com/itwillwork/function-logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243363,"owners_count":22038046,"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":["debugging-tool","frontend","functional-programming","javascript"],"created_at":"2024-11-06T19:07:28.722Z","updated_at":"2025-05-14T23:08:17.663Z","avatar_url":"https://github.com/itwillwork.png","language":"JavaScript","readme":"# function-logger\nAwesome tool for [FP JS](https://github.com/stoeffel/awesome-fp-js). Logging of the input and output arguments of the function on each call.\n\n[JSBin demo](https://jsbin.com/sayujal/1/edit?js)\n\n## Motivation\nfor example, debugging sort products code:\n```javascript\nconst byPrice = order =\u003e (a, b) =\u003e order(a.price, b.price);\n\nconst asc = (a, b) =\u003e a - b;\nconst desc = (a, b) =\u003e b - a;\n\nconst products = [{price: 100}, {price: 50}, {price: 300}];\n\n// products.sort(byPrice(desc));\n\n// use functionLogger for fast logging\nproducts.sort(functionLogger(byPrice(desc)));\n```\nbrowser console output \n\n\u003cimg width=\"1000\" alt=\"output\" src=\"https://github.com/itwillwork/function-logger/blob/master/media/demo.png?raw=true\"\u003e\n\n### Installation\n\n```\nnpm install function-logger --save-dev\n```\n\nYou can set globally, to be used in all their projects without having to install each.\n  \n## Usage \nWrap the function for which you want to watch. And yet! :checkered_flag:\n```javascript\nimport functionLogger from 'function-logger';\n\n// foo('bar')\nfunctionLogger(foo)('bar')\n```\n\n## Usage for CodePen and JSBin as UMD module\nin html area\n```javascript\n\u003cscript src=\"https://unpkg.com/function-logger@latest/build/umd/index.js\"\u003e\u003c/script\u003e\n```\nin js area use ```functionLogger``` from global scope\n\n[JSBin demo](https://jsbin.com/sayujal/1/edit?js)\n\n## Contributing\nGot ideas on how to make this better? Open an issue!\n\n## License\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitwillwork%2Ffunction-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitwillwork%2Ffunction-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitwillwork%2Ffunction-logger/lists"}