Update viewmodel.js

Added function as property argument
Update viewmodel.js

added check for observable
Merge pull request #3 from evilnode/master

Update viewmodel.js