after invocation handler
npm install @dizmo/functions-after


Returns 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.
``sh`
npm install @dizmo/functions-after --save
`javascript`
const { after } = require("@dizmo/functions-after");
`typescript`
import { after } from "@dizmo/functions-after";
`typescript`
const f1 = (): number => {
return 1;
};
const f2 = after(f1, (n: number): number => {
return n + 1;
});
const expect = 2 === f2();
`typescript`
class Class {
@after.decorator((n: number): number => {
return n + 1;
})
public method(): number {
return 1;
}
}
const expect = 2 === new Class().method();
`sh`
npm run clean
`sh`
npm run build
#### without linting and cleaning:
`sh`
npm run -- build --no-lint --no-clean
#### with UMD bundling (incl. minimization):
`sh`
npm run -- build --prepack
#### with UMD bundling (excl. minimization):
`sh`
npm run -- build --prepack --no-minify
`sh`
npm run lint
#### with auto-fixing:
`sh`
npm run -- lint --fix
`sh`
npm run test
#### without linting, cleaning and (re-)building:
`sh`
npm run -- test --no-lint --no-clean --no-build
`sh`
npm run cover
#### without linting, cleaning and (re-)building:
`sh`
npm run -- cover --no-lint --no-clean --no-build
`sh`
npm run docs
`sh`
npm publish
#### initially (if public):
`sh``
npm publish --access=public
© 2020 dizmo AG, Switzerland