We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e890fd commit 9f60d4eCopy full SHA for 9f60d4e
1 file changed
lib/callable.js
@@ -52,7 +52,7 @@ export class Callable extends Function {
52
}
53
54
55
-export function makeCallable ( instance, method ) {
+export function makeCallable ( instance, method, { name } = {} ) {
56
const config = {
57
instance,
58
method,
@@ -61,5 +61,10 @@ export function makeCallable ( instance, method ) {
61
return config;
62
};
63
64
+ Object.defineProperty( target, "name", {
65
+ "value": name || method,
66
+ "configurable": true,
67
+ } );
68
+
69
return new Proxy( target, PROXY );
70
0 commit comments