Releases: sindresorhus/mimic-function
Releases · sindresorhus/mimic-function
v5.0.1
v5.0.0
Breaking
v4.0.0
v3.1.0
v3.0.0
Breaking changes
- Copy inherited properties of the original function. (#30)
- Do not copy the
length
property. (#23) - Drop support for Node 6. (#25)
- Remove
module.exports.default
. (#26) If you used to dorequire('mimic-fn').default
, you should now userequire('mimic-fn')
directly.
Features
String(wrapper)
now mimicsString(originalFunction)
. A comment is prepended to indicate the original function has been wrapped. (#32)- Add boolean option
ignoreNonConfigurable
to ignore the wrapper function's non-configurable properties instead of throwing an error. This defaults tofalse
. (#33, #34, #35) - Allow functions with different
prototype
such as classes, constructor functions and arrow functions. (#31, #36)
Design
- Add a logo. (#37)
Maintainers
- Add @ehmicky as an additional maintainer.