Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.76 KB

api.md

File metadata and controls

48 lines (34 loc) · 1.76 KB

Constants

defaultOptions : decide

defaults to a function always returning true

Functions

createFactory(ClassDefinition)function

Creates a factory function that produces proxies to instances of a {class} definition, based on

defaultOptions : decide

defaults to a function always returning true

Kind: global constant

createFactory(ClassDefinition) ⇒ function

Creates a factory function that produces proxies to instances of a {class} definition, based on

Kind: global function
Returns: function - A factory function to produce proxies to an instance

Param Type Description
ClassDefinition
options.decide function A function that checks the instance's given {key} and {value} of a property and returns true, if the property is public or false if private.
options.revealIsProxy boolean if true it allows external code to ask for {isProxy} which then returns true
options.referenceClass boolean if true it allows external code to ask for {class} which then returns the referenced original class definition but never the instance

createFactory~factory(...invocationArgs) ⇒ proxy

Creates an instance of the given ClassDefinition

Kind: inner method of createFactory

Param Description
...invocationArgs arguments of arbitrary length, determined by ClassDefinition