Skip to content

Commit

Permalink
refactor:(facade/collections): change value method on StringMapWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotell committed Apr 1, 2016
1 parent 62a1383 commit 709637e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/facade/collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,11 @@ export class StringMapWrapper {
}
}

static values<K, V>( map: {[key: string]: V} ): V[] {

const values = [];
StringMapWrapper.forEach( map, ( value )=> {
values.push( value );
} );

return values;

static values<T>( map: {[key: string]: T} ): T[] {
return Object.keys( map ).reduce( ( r, a ) => {
r.push( map[ a ] );
return r;
}, [] );
}

static merge<V>( m1: {[key: string]: V}, m2: {[key: string]: V} ): {[key: string]: V} {
Expand Down

0 comments on commit 709637e

Please sign in to comment.