_(...).zip and aliases

This commit is contained in:
motemen
2014-10-18 18:08:05 +09:00
parent a59dd92bf7
commit 3653640a60
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -326,6 +326,8 @@ result = <_.LoDashArrayWrapper<number>>_([1, 2, 3, 4, 5]).xor([5, 2, 10], [4, 5,
result = <any[][]>_.zip(['moe', 'larry'], [30, 40], [true, false]);
result = <any[][]>_.unzip(['moe', 'larry'], [30, 40], [true, false]);
result = <any[][]>_(['moe', 'larry']).zip([30, 40], [true, false]).value();
result = <any[][]>_(['moe', 'larry']).unzip([30, 40], [true, false]).value();
// /* *************
// * Collections *
+12
View File
@@ -2027,6 +2027,18 @@ declare module _ {
unzip(...arrays: any[]): any[];
}
interface LoDashArrayWrapper<T> {
/**
* @see _.zip
**/
zip(...arrays: any[][]): _.LoDashArrayWrapper<any[][]>;
/**
* @see _.zip
**/
unzip(...arrays: any[]): _.LoDashArrayWrapper<any[][]>;
}
//_.zipObject
interface LoDashStatic {
/**