|
@ -6,7 +6,9 @@ export namespace Objects { |
|
|
return _isEqual(first, second); |
|
|
return _isEqual(first, second); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export function* entries(o: any): IterableIterator<[string, any]> { |
|
|
|
|
|
|
|
|
export function entries<T>(o: { [key: string]: T }): IterableIterator<[string, T]>; |
|
|
|
|
|
export function entries<T>(o: { [key: number]: T }): IterableIterator<[string, T]>; |
|
|
|
|
|
export function* entries<T>(o: any): IterableIterator<[string, T]> { |
|
|
for (const key in o) { |
|
|
for (const key in o) { |
|
|
yield [key, o[key]]; |
|
|
yield [key, o[key]]; |
|
|
} |
|
|
} |
|
@ -56,6 +58,8 @@ export namespace Objects { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export function values<T>(o: { [key: string]: T }): IterableIterator<T>; |
|
|
|
|
|
export function values<T>(o: { [key: number]: T }): IterableIterator<T>; |
|
|
export function* values<T>(o: any): IterableIterator<T> { |
|
|
export function* values<T>(o: any): IterableIterator<T> { |
|
|
for (const key in o) { |
|
|
for (const key in o) { |
|
|
yield o[key]; |
|
|
yield o[key]; |
|
|