Skip to content

Instantly share code, notes, and snippets.

@Yang03
Created October 10, 2017 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yang03/a95018de754c092ff009d514f6aa0d81 to your computer and use it in GitHub Desktop.
Save Yang03/a95018de754c092ff009d514f6aa0d81 to your computer and use it in GitHub Desktop.
function fnWrapDecorator(fn) {
return (...args) => {
return (target, propertyKey, descriptor) => {
const fn = descriptor.value
let wrappedFn = fn.applay(null, [fn, ...args])
return {
configurable: true,
get() {
return fn
}
}
}
}
}
@Yang03
Copy link
Author

Yang03 commented Oct 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment