feat(facade): add .values to StringMapWrapper
This commit is contained in:
parent
cb38d72ff4
commit
f1796d67f4
|
@ -85,6 +85,10 @@ class StringMapWrapper {
|
|||
return a.keys.toList();
|
||||
}
|
||||
|
||||
static List values(Map<String, dynamic> a) {
|
||||
return a.values.toList();
|
||||
}
|
||||
|
||||
static bool isEmpty(Map m) => m.isEmpty;
|
||||
static bool equals/*<V>*/(Map/*<String,V>*/ m1, Map/*<String,V>*/ m2) {
|
||||
if (m1.length != m2.length) {
|
||||
|
|
|
@ -116,6 +116,12 @@ export class StringMapWrapper {
|
|||
}
|
||||
static set<V>(map: {[key: string]: V}, key: string, value: V) { map[key] = value; }
|
||||
static keys(map: {[key: string]: any}): string[] { return Object.keys(map); }
|
||||
static values<T>(map: {[key: string]: T}): T[] {
|
||||
return Object.keys(map).reduce((r, a) => {
|
||||
r.push(map[a]);
|
||||
return r;
|
||||
}, []);
|
||||
}
|
||||
static isEmpty(map: {[key: string]: any}): boolean {
|
||||
for (var prop in map) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue