jamesfoster/knockout.observableDictionary — pull request #6 by vanderlee (2013-05-19 10:12:25+00:00)
Title: .has() method and newValueCallback

I needed to have a Dictionary that is able to create a new value if a new key is accessed.
This change implements an optional newValueCallback argument.
If not specified, observableDictionary works as usual.
If specified with a callback, observableDictionary will call the callback with the key as it's first argument. The return value of the callback will be used as the value for the new key.
You need this if the Knockout template is dynamically determined by the viewmodel itself.

In order to be able to check for existance of keys without using .get(), I also added a .has() method.