In JavaScript I’d like to take an object and pass a parameter to it and based on the parameter have a method that will pass settings to the parameter:
functionName( parameter , settings );
Or
functionName( parameter ).methodName( settings );
example: for my iPhone web app setup I do heavy(‘setup’,{ icon: ‘icon.png’ }); and I want to move the second parameter to a method: heavy(‘setup’).settings({ icon: ‘icon.png’ }); for my ease and learning…
Do you mean something like this?