Skip to content

Commit

Permalink
refactor(cache): update iterator methods
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Aug 25, 2018
1 parent 8e9ba34 commit 866f3cd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/cache/src/lru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ export class LRUCache<K, V> implements ICache<K, V> {
return this.entries();
}

*entries(): IterableIterator<Readonly<[K, CacheEntry<K, V>]>> {
yield* map((e) => <[K, CacheEntry<K, V>]>[e.k, e], this.items);
entries(): IterableIterator<Readonly<[K, CacheEntry<K, V>]>> {
return map((e) => <[K, CacheEntry<K, V>]>[e.k, e], this.items);
}

*keys(): IterableIterator<Readonly<K>> {
yield* map((e) => e.k, this.items);
keys(): IterableIterator<Readonly<K>> {
return map((e) => e.k, this.items);
}

*values(): IterableIterator<Readonly<V>> {
yield* map((e) => e.v, this.items);
values(): IterableIterator<Readonly<V>> {
return map((e) => e.v, this.items);
}

copy(): ICache<K, V> {
Expand Down

0 comments on commit 866f3cd

Please sign in to comment.