Package: decorators 0.3.0

Harel Lustiger

decorators: Extend the Behaviour of a Function without Explicitly Modifying it

A decorator is a function that receives a function, extends its behaviour, and returned the altered function. Any caller that uses the decorated function uses the same interface as it were the original, undecorated function. Decorators serve two primary uses: (1) Enhancing the response of a function as it sends data to a second component; (2) Supporting multiple optional behaviours. An example of the first use is a timer decorator that runs a function, outputs its execution time on the console, and returns the original function's result. An example of the second use is input type validation decorator that during running time tests whether the caller has passed input arguments of a particular class. Decorators can reduce execution time, say by memoization, or reduce bugs by adding defensive programming routines.

Authors:Harel Lustiger [aut, cre], Tidylab [cph, fnd]

decorators_0.3.0.tar.gz
decorators_0.3.0.zip(r-4.7)decorators_0.3.0.zip(r-4.6)decorators_0.3.0.zip(r-4.5)
decorators_0.3.0.tgz(r-4.6-any)decorators_0.3.0.tgz(r-4.5-any)
decorators_0.3.0.tar.gz(r-4.7-any)decorators_0.3.0.tar.gz(r-4.6-any)
decorators_0.3.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
decorators/json (API)
NEWS

# Install 'decorators' in R:
install.packages('decorators', repos = c('https://tidylab.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/tidylab/decorators/issues

Pkgdown/docs site:https://tidylab.github.io

On CRAN:

Conda:

decoratorsdesign-patterns

3.78 score 12 stars 4 scripts 191 downloads 4 exports 7 dependencies

Last updated from:c74e1ad648. Checks:7 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64WARNING128
source / vignettesOK152
linux-release-x86_64WARNING102
macos-release-arm64WARNING98
macos-oldrel-arm64WARNING112
windows-develWARNING62
windows-releaseWARNING64
windows-oldrelWARNING65
wasm-releaseOK99

Exports:%>%%||%time_itvalidate_arguments

Dependencies:cligluelifecyclemagrittrpurrrrlangvctrs