Last active
February 24, 2025 14:47
-
-
Save hyle/1180607 to your computer and use it in GitHub Desktop.
Revisions
-
hyle revised this gist
Feb 23, 2013 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ // knockout 2.2.1 ko.utils.arrayFilter = function (array, predicate) { /* .. */ } ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ } -
hyle revised this gist
Dec 19, 2012 . 1 changed file with 54 additions and 26 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,51 +1,79 @@ // knockout 2.2.0 ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ } ko.utils.arrayForEach = function (array, action) { /* .. */ } ko.utils.arrayGetDistinctValues = function (array) { /* .. */ } ko.utils.arrayIndexOf = function (array, item) { /* .. */ } ko.utils.arrayMap = function (array, mapping) { /* .. */ } ko.utils.arrayPushAll = function (array, valuesToPush) { /* .. */ } ko.utils.arrayRemoveItem = function (array, itemToRemove) { /* .. */ } ko.utils.cloneNodes = function (nodesArray, shouldCleanNodes) { /* .. */ } ko.utils.compareArrays = function compareArrays(oldArray, newArray, dontLimitMoves) { /* .. */ } ko.utils.domNodeIsAttachedToDocument = function (node) { /* .. */ } ko.utils.domNodeIsContainedBy = function (node, containedByNode) { /* .. */ } ko.utils.emptyDomNode = function (domNode) { /* .. */ } ko.utils.ensureSelectElementIsRenderedCorrectly = function (selectElement) { /* .. */ } ko.utils.extend = function (target, source) { /* .. */ } ko.utils.forceRefresh = function (node) { /* .. */ } ko.utils.getFormFields = function (form, fieldName) { /* .. */ } ko.utils.makeArray = function (arrayLikeObject) { /* .. */ } ko.utils.moveCleanedNodesToContainerElement = function (nodes) { /* .. */ } ko.utils.parseHtmlFragment = function (html) { /* .. */ } ko.utils.parseJson = function (jsonString) { /* .. */ } ko.utils.peekObservable = function (value) { /* .. */ } ko.utils.postJson = function (urlOrForm, data, options) { /* .. */ } ko.utils.range = function (min, max) { /* .. */ } ko.utils.registerEventHandler = function (element, eventType, handler) { /* .. */ } ko.utils.replaceDomNodes = function (nodeToReplaceOrNodeArray, newNodesArray) { /* .. */ } ko.utils.setDomNodeChildren = function (domNode, childNodes) { /* .. */ } ko.utils.setDomNodeChildrenFromArrayMapping = function (domNode, array, mapping, options, callbackAfterAddingNodes) { /* .. */ } ko.utils.setElementName = function (element, name) { /* .. */ } ko.utils.setHtml = function (node, html) { /* .. */ } ko.utils.setOptionNodeSelectionState = function (optionNode, isSelected) { /* .. */ } ko.utils.setTextContent = function (element, textContent) { /* .. */ } ko.utils.stringStartsWith = function (string, startsWith) { /* .. */ } ko.utils.stringTokenize = function (string, delimiter) { /* .. */ } ko.utils.stringTrim = function (string) { /* .. */ } ko.utils.stringifyJson = function (data, replacer, space) { // replacer and space are optional /* .. */ } ko.utils.tagNameLower = function (element) { /* .. */ } ko.utils.toggleDomNodeCssClass = function (node, classNames, shouldHaveClass) { /* .. */ } ko.utils.triggerEvent = function (element, eventType) { /* .. */ } ko.utils.unwrapObservable = function (value) { /* .. */ } -
hyle revised this gist
Aug 30, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ ko.utils.stringTrim = function (string) ko.utils.stringTokenize = function (string, delimiter) ko.utils.stringStartsWith = function (string, startsWith) ko.utils.evalWithinScope = function (expression /*, scope1, scope2, scope3... */) -
hyle revised this gist
Aug 30, 2011 . 1 changed file with 51 additions and 27 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,27 +1,51 @@ ko.utils.arrayForEach = function (array, action) ko.utils.arrayIndexOf = function (array, item) ko.utils.arrayFirst = function (array, predicate, predicateOwner) ko.utils.arrayRemoveItem = function (array, itemToRemove) ko.utils.arrayMap = function (array, mapping) ko.utils.arrayFilter = function (array, predicate) ko.utils.arrayPushAll = function (array, valuesToPush) ko.utils.extend = function (target, source) ko.utils.emptyDomNode = function (domNode) ko.utils.setDomNodeChildren = function (domNode, childNodes) ko.utils.replaceDomNodes = function (nodeToReplaceOrNodeArray, newNodesArray) ko.utils.setOptionNodeSelectionState = function (optionNode, isSelected) ko.utils.stringTrim = function (string) ko.utils.stringTokenize = function (string, delimiter) ko.utils.stringStartsWith = function (string, startsWith) { ko.utils.evalWithinScope = function (expression /*, scope1, scope2, scope3... */) ko.utils.domNodeIsContainedBy = function (node, containedByNode) ko.utils.domNodeIsAttachedToDocument = function (node) ko.utils.registerEventHandler = function (element, eventType, handler) ko.utils.triggerEvent = function (element, eventType) ko.utils.unwrapObservable = function (value) ko.utils.domNodeHasCssClass = function (node, className) ko.utils.toggleDomNodeCssClass = function (node, className, shouldHaveClass) ko.utils.outerHTML = function(node) ko.utils.range = function (min, max) ko.utils.makeArray = function(arrayLikeObject) -
hyle created this gist
Aug 30, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ ko.utils.arrayForEach = function (array, action) ko.utils.arrayIndexOf = function (array, item) ko.utils.arrayFirst = function (array, predicate, predicateOwner) ko.utils.arrayRemoveItem = function (array, itemToRemove) ko.utils.arrayMap = function (array, mapping) ko.utils.arrayFilter = function (array, predicate) ko.utils.arrayPushAll = function (array, valuesToPush) ko.utils.extend = function (target, source) ko.utils.emptyDomNode = function (domNode) ko.utils.setDomNodeChildren = function (domNode, childNodes) ko.utils.replaceDomNodes = function (nodeToReplaceOrNodeArray, newNodesArray) ko.utils.setOptionNodeSelectionState = function (optionNode, isSelected) ko.utils.stringTrim = function (string) ko.utils.stringTokenize = function (string, delimiter) ko.utils.stringStartsWith = function (string, startsWith) { ko.utils.evalWithinScope = function (expression /*, scope1, scope2, scope3... */) ko.utils.domNodeIsContainedBy = function (node, containedByNode) ko.utils.domNodeIsAttachedToDocument = function (node) ko.utils.registerEventHandler = function (element, eventType, handler) ko.utils.triggerEvent = function (element, eventType) ko.utils.unwrapObservable = function (value) ko.utils.domNodeHasCssClass = function (node, className) ko.utils.toggleDomNodeCssClass = function (node, className, shouldHaveClass) ko.utils.outerHTML = function(node) ko.utils.range = function (min, max) ko.utils.makeArray = function(arrayLikeObject)