diff --git a/build/underscore-ko.d.ts b/build/underscore-ko.d.ts index 2865f41..7bae1da 100644 --- a/build/underscore-ko.d.ts +++ b/build/underscore-ko.d.ts @@ -26,11 +26,11 @@ interface KnockoutObservableArrayFunctions { * @param context `this` object in `iterator`, optional. * @return The mapped array result. **/ - map(iterator: _.ListIterator, context?: any): TResult[]; + map(iterator: _.ListIterator, context?: any): TResult[]; /** * @see _.map **/ - collect(iterator: _.ListIterator, context?: any): TResult[]; + collect(iterator: _.ListIterator, context?: any): TResult[]; /** * Also known as inject and foldl, reduce boils down a list of values into a single value. * Memo is the initial state of the reduction, and each successive step of it should be @@ -41,15 +41,15 @@ interface KnockoutObservableArrayFunctions { * @param context `this` object in `iterator`, optional. * @return Reduced object result. **/ - reduce(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + reduce(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; /** * @see _.reduce **/ - inject(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + inject(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; /** * @see _.reduce **/ - foldl(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + foldl(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; /** * The right-associative version of reduce. Delegates to the JavaScript 1.8 version of * reduceRight, if it exists. `foldr` is not as useful in JavaScript as it would be in a @@ -59,11 +59,11 @@ interface KnockoutObservableArrayFunctions { * @param context `this` object in `iterator`, optional. * @return Reduced object result. **/ - reduceRight(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + reduceRight(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; /** * @see _.reduceRight **/ - foldr(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + foldr(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; /** * Looks through each value in the list, returning the first one that passes a truth * test (iterator). The function returns as soon as it finds an acceptable element, @@ -201,7 +201,7 @@ interface KnockoutObservableArrayFunctions { * @param context `this` object in `iterator`, optional. * @return A sorted copy of `list`. **/ - sortBy(iterator?: _.ListIterator, context?: any): T[]; + sortBy(iterator?: _.ListIterator, context?: any): T[]; /** * @see _.sortBy * @param iterator Sort iterator for each element within `list`. @@ -381,19 +381,19 @@ interface KnockoutObservableArrayFunctions { * @param context 'this' object in `iterator`, optional. * @return Copy of `array` where all elements are unique. **/ - uniq(isSorted?: boolean, iterator?: _.ListIterator, context?: any): T[]; + uniq(isSorted?: boolean, iterator?: _.ListIterator, context?: any): T[]; /** * @see _.uniq **/ - uniq(iterator?: _.ListIterator, context?: any): T[]; + uniq(iterator?: _.ListIterator, context?: any): T[]; /** * @see _.uniq **/ - unique(iterator?: _.ListIterator, context?: any): T[]; + unique(iterator?: _.ListIterator, context?: any): T[]; /** * @see _.uniq **/ - unique(isSorted?: boolean, iterator?: _.ListIterator, context?: any): T[]; + unique(isSorted?: boolean, iterator?: _.ListIterator, context?: any): T[]; /** * Merges together the values of each of the arrays with the values at the corresponding position. * Useful when you have separate data sources that are coordinated through matching array indexes. @@ -464,7 +464,7 @@ interface KnockoutObservableArrayFunctions { * @param iterator Iterator to compute the sort ranking of each value, optional. * @return The index where `value` should be inserted into `list`. **/ - sortedIndex(value: T, iterator?: (x: T) => TSort, context?: any): number; + sortedIndex(value: T, iterator?: (x: T) => TSort, context?: any): number; /************ * Mutators * ************/ diff --git a/build/underscore-ko.js b/build/underscore-ko.js index 2aeb270..b045844 100644 --- a/build/underscore-ko.js +++ b/build/underscore-ko.js @@ -1,4 +1,4 @@ -// underscore-ko - v1.8.1 - 2016-03-13 +// underscore-ko - v1.8.2 - 2016-03-15 // https://github.com/kamranayub/UnderscoreKO // Copyright (c) 2016 Kamran Ayub ; Licensed MIT */ (function (factory) { diff --git a/build/underscore-ko.min.js b/build/underscore-ko.min.js index da7a17c..5284f2c 100644 --- a/build/underscore-ko.min.js +++ b/build/underscore-ko.min.js @@ -1,4 +1,4 @@ -// underscore-ko - v1.8.1 - 2016-03-13 +// underscore-ko - v1.8.2 - 2016-03-15 // https://github.com/kamranayub/UnderscoreKO // Copyright (c) 2016 Kamran Ayub ; Licensed MIT */ !function(n){var define=define;"function"==typeof define&&define.amd?define(["knockout","underscore"],n):n(window.ko,window._)}(function(n,e){var t=["each","forEach","map","collect","reduce","inject","foldl","reduceRight","foldr","find","detect","filter","select","filter_","select_","where","findWhere","reject","reject_","all","every","any","some","include","contains","invoke","invoke_","pluck","max","min","sortBy","sortBy_","groupBy","groupBy_","indexBy","countBy","shuffle","shuffle_","sample","size","partition","first","head","take","initial","last","rest","tail","drop","rest_","tail_","drop_","compact","compact_","flatten","flatten_","without","without_","union","union_","intersection","intersection_","difference","difference_","uniq","unique","uniq_","unique_","zip","zip_","unzip","unzip_","object","lastIndexOf","sortedIndex","findIndex","findLastIndex","chain"],i=["union","union_","intersection","intersection_","zip","zip_"];e.property=function(e){return function(t){return null==t?void 0:n.utils.unwrapObservable(t)[e]}},e.propertyOf=function(e){return null==e?function(){}:function(t){return n.utils.unwrapObservable(e)[t]}},e.isMatch=function(t,i){var r=e.keys(i),u=r.length;if(null==t)return!u;for(var o=Object(n.utils.unwrapObservable(t)),c=0;u>c;c++){var a=r[c];if(i[a]!==o[a]||!(a in o))return!1}return!0},e.each(e.union(t,i),function(t){n.observableArray.fn[t]||(n.observableArray.fn[t]=function(){var n=e.toArray(arguments);return e.include(i,t)&&e.each(n,function(e,i){"function"==typeof e&&e[t]&&(n[i]=e())}),n.splice(0,0,this()),"_"===t.substr(t.length-1,1)?this(e[t.substr(0,t.length-1)].apply(this,n)):e[t].apply(this,n)})})}); \ No newline at end of file diff --git a/package.json b/package.json index 594e325..c08f738 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "underscore-ko", "description": "Dead simple utility that attaches Underscore.js array and collection functions (and mutators) to Knockout.js observable arrays.", - "version": "1.8.1", + "version": "1.8.2", "author": "Kamran Ayub ", "homepage": "https://github.com/kamranayub/UnderscoreKO", "repository": { diff --git a/src/interface.ts b/src/interface.ts index f7be58a..71dc8d2 100644 --- a/src/interface.ts +++ b/src/interface.ts @@ -34,14 +34,14 @@ interface KnockoutObservableArrayFunctions { * @param context `this` object in `iterator`, optional. * @return The mapped array result. **/ - map( + map( iterator: _.ListIterator, context?: any): TResult[]; /** * @see _.map **/ - collect( + collect( iterator: _.ListIterator, context?: any): TResult[]; @@ -55,7 +55,7 @@ interface KnockoutObservableArrayFunctions { * @param context `this` object in `iterator`, optional. * @return Reduced object result. **/ - reduce( + reduce( iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; @@ -63,7 +63,7 @@ interface KnockoutObservableArrayFunctions { /** * @see _.reduce **/ - inject( + inject( iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; @@ -71,7 +71,7 @@ interface KnockoutObservableArrayFunctions { /** * @see _.reduce **/ - foldl( + foldl( iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; @@ -85,7 +85,7 @@ interface KnockoutObservableArrayFunctions { * @param context `this` object in `iterator`, optional. * @return Reduced object result. **/ - reduceRight( + reduceRight( iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; @@ -93,7 +93,7 @@ interface KnockoutObservableArrayFunctions { /** * @see _.reduceRight **/ - foldr( + foldr( iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; @@ -287,7 +287,7 @@ interface KnockoutObservableArrayFunctions { * @param context `this` object in `iterator`, optional. * @return A sorted copy of `list`. **/ - sortBy( + sortBy( iterator?: _.ListIterator, context?: any): T[]; @@ -528,7 +528,7 @@ interface KnockoutObservableArrayFunctions { * @param context 'this' object in `iterator`, optional. * @return Copy of `array` where all elements are unique. **/ - uniq( + uniq( isSorted?: boolean, iterator?: _.ListIterator, context?: any): T[]; @@ -536,21 +536,21 @@ interface KnockoutObservableArrayFunctions { /** * @see _.uniq **/ - uniq( + uniq( iterator?: _.ListIterator, context?: any): T[]; /** * @see _.uniq **/ - unique( + unique( iterator?: _.ListIterator, context?: any): T[]; /** * @see _.uniq **/ - unique( + unique( isSorted?: boolean, iterator?: _.ListIterator, context?: any): T[]; @@ -644,7 +644,7 @@ interface KnockoutObservableArrayFunctions { * @param iterator Iterator to compute the sort ranking of each value, optional. * @return The index where `value` should be inserted into `list`. **/ - sortedIndex( + sortedIndex( value: T, iterator?: (x: T) => TSort, context?: any): number;