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
// knockout 3.4.0rc | |
ko.utils.addOrRemoveItem = function (array, value, included) { /* .. */ } | |
ko.utils.anyDomNodeIsAttachedToDocument = function (nodes) { /* .. */ } | |
ko.utils.arrayFilter = function (array, predicate) { /* .. */ } | |
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ } |
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
// accepts optional transformer | |
// now transformers are compatible with ES6 | |
String.prototype.template = function (fn, object) {'use strict'; | |
// Andrea Giammarchi - WTFPL License | |
var | |
hasTransformer = typeof fn === 'function', | |
stringify = JSON.stringify, | |
re = /\$\{([\S\s]*?)\}/g, | |
strings = [], | |
values = hasTransformer ? [] : strings, |