This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (undefined) { | |
// | |
// simple map function to extend the observableArray. | |
ko.observableArray.fn.map = function (data, Constructor) { | |
var mapped = ko.utils.arrayMap(data, function (item) { | |
return new Constructor(item); | |
}); | |
this(mapped); |