O'Reilly logo

Mastering KnockoutJS by Timothy Moran

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The ko.utils reference

The ko.utils namespace is Knockout's bucket for utility functions. Not all of these functions are publicly exposed—at least not in a usable way. Knockout's minification process obfuscates more than half of them. As the unobfuscated methods are a public API that Knockout has committed to providing, changing them would be a major change. Despite considering all of the exposed methods on the ko.utils part of the API, Knockout does not provide any documentation for them.

Here is a complete list of the public functions on ko.utils as of Knockout 3.2:

  • addOrRemoveItem(array, item, included): If included is true, it will add the item to the array if it is not already there; if included is false, it will remove the item from the array ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required