{"id":20390661,"url":"https://github.com/dizmo/functions-after","last_synced_at":"2026-05-10T00:47:53.167Z","repository":{"id":42231450,"uuid":"145578979","full_name":"dizmo/functions-after","owner":"dizmo","description":"dizmoFun: after handler","archived":false,"fork":false,"pushed_at":"2023-10-18T13:43:25.000Z","size":938,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-19T02:37:42.278Z","etag":null,"topics":["after","dizmo","function","handler","javascript","library","typescript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dizmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-21T14:54:48.000Z","updated_at":"2022-11-16T18:59:58.000Z","dependencies_parsed_at":"2023-02-08T12:32:07.176Z","dependency_job_id":"80d83ff0-4411-41b6-8a2b-9367a2f4c770","html_url":"https://github.com/dizmo/functions-after","commit_stats":{"total_commits":47,"total_committers":2,"mean_commits":23.5,"dds":0.04255319148936165,"last_synced_commit":"a55b8f7437922dae3451df75f8aec9c7d3d19575"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizmo%2Ffunctions-after","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizmo%2Ffunctions-after/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizmo%2Ffunctions-after/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dizmo%2Ffunctions-after/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dizmo","download_url":"https://codeload.github.com/dizmo/functions-after/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241422984,"owners_count":19960599,"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":["after","dizmo","function","handler","javascript","library","typescript"],"created_at":"2024-11-15T03:26:10.769Z","updated_at":"2026-05-10T00:47:53.100Z","avatar_url":"https://github.com/dizmo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://badge.fury.io/js/%40dizmo%2Ffunctions-after.svg)](https://npmjs.org/package/@dizmo/functions-after)\n[![Build Status](https://travis-ci.com/dizmo/functions-after.svg?branch=master)](https://travis-ci.com/dizmo/functions-after)\n[![Coverage Status](https://coveralls.io/repos/github/dizmo/functions-after/badge.svg?branch=master)](https://coveralls.io/github/dizmo/functions-after?branch=master)\n\n# @dizmo/functions-after\n\nReturns a function decorating an original function with a callback, which will be invoked after the execution of the original function. The return value of the original function will be handed over to the *after* callback as an argument, while the return value of the callback will become the overall result.\n\n## Usage\n\n### Install\n\n```sh\nnpm install @dizmo/functions-after --save\n```\n\n### Require\n\n```javascript\nconst { after } = require(\"@dizmo/functions-after\");\n```\n\n### Examples\n\n```typescript\nimport { after } from \"@dizmo/functions-after\";\n```\n\n```typescript\nconst f1 = (): number =\u003e {\n    return 1;\n};\nconst f2 = after(f1, (n: number): number =\u003e {\n    return n + 1;\n});\nconst expect = 2 === f2();\n```\n\n```typescript\nclass Class {\n    @after.decorator((n: number): number =\u003e {\n        return n + 1;\n    })\n    public method(): number {\n        return 1;\n    }\n}\nconst expect = 2 === new Class().method();\n```\n\n## Development\n\n### Clean\n\n```sh\nnpm run clean\n```\n\n### Build\n\n```sh\nnpm run build\n```\n\n#### without linting and cleaning:\n\n```sh\nnpm run -- build --no-lint --no-clean\n```\n\n#### with UMD bundling (incl. minimization):\n\n```sh\nnpm run -- build --prepack\n```\n\n#### with UMD bundling (excl. minimization):\n\n```sh\nnpm run -- build --prepack --no-minify\n```\n\n### Lint\n\n```sh\nnpm run lint\n```\n\n#### with auto-fixing:\n\n```sh\nnpm run -- lint --fix\n```\n\n### Test\n\n```sh\nnpm run test\n```\n\n#### without linting, cleaning and (re-)building:\n\n```sh\nnpm run -- test --no-lint --no-clean --no-build\n```\n\n### Cover\n\n```sh\nnpm run cover\n```\n\n#### without linting, cleaning and (re-)building:\n\n```sh\nnpm run -- cover --no-lint --no-clean --no-build\n```\n\n## Documentation\n\n```sh\nnpm run docs\n```\n\n## Publish\n\n```sh\nnpm publish\n```\n\n#### initially (if public):\n\n```sh\nnpm publish --access=public\n```\n\n## Copyright\n\n © 2020 [dizmo AG](http://dizmo.com/), Switzerland\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdizmo%2Ffunctions-after","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdizmo%2Ffunctions-after","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdizmo%2Ffunctions-after/lists"}