functionwrapper

noun
UK /ˈfʌŋkʃən ˈræpə/
US /ˈfʌŋkʃən ˈræpər/

A function wrapper is a special cover that goes around a piece of code to help it do extra jobs.

The programmer used a function wrapper to add logging without changing the original code.


OTHER MEANINGS

2. A small piece of code that adds a safety check around another function before it runs.

They wrote a function wrapper to catch errors from the network call.

3. A tool that changes how a function behaves without editing the function itself.

The timing function wrapper measured how long each task took.

4. A layer that hides the details of a function and shows only a simpler interface.

The library's function wrapper made the complex API easy for beginners.