Use Proxy for accessing properties of remote function

This commit is contained in:
Kevin Sawicki 2016-08-16 13:54:21 -07:00
parent 8b38018ab4
commit d226b7bc6c
4 changed files with 25 additions and 28 deletions

View file

@ -1,8 +1,16 @@
function foo () {}
function foo () {
return 'hello'
}
foo.bar = 'baz'
foo.nested = {
prop: 'yes'
}
foo.method1 = function () {
return 'world'
}
foo.method1.prop1 = function () {
return 123
}
module.exports = {
foo: foo