Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BaseCollection<string, Bucket>
    • BucketCollection

Index

Constructors

constructor

  • new BucketCollection(__namedParameters?: BaseCollectionOptions): BucketCollection
  • Parameters

    • Optional __namedParameters: BaseCollectionOptions

    Returns BucketCollection

Properties

Optional _lastUsed

_lastUsed: Map<string, number>

Readonly cache

cache: Map<string, Bucket>

Optional expire

expire: number

Optional interval

interval: Interval

intervalTime

intervalTime: number

limit

limit: number

Accessors

[Symbol.toStringTag]

  • get [Symbol.toStringTag](): string

lastUsed

  • get lastUsed(): Map<K, number>
  • Returns Map<K, number>

length

  • get length(): number
  • Returns number

shouldStartInterval

  • get shouldStartInterval(): boolean
  • Returns boolean

size

  • get size(): number
  • Returns number

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<[string, Bucket]>
  • Returns IterableIterator<[string, Bucket]>

clear

  • clear(): void
  • Returns void

clone

  • clone(): BaseCollection<string, Bucket>
  • Returns BaseCollection<string, Bucket>

delete

  • delete(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

entries

  • entries(): IterableIterator<[string, Bucket]>
  • Returns IterableIterator<[string, Bucket]>

every

  • every(func: (v: Bucket, k: string) => boolean): boolean
  • Parameters

    • func: (v: Bucket, k: string) => boolean
        • (v: Bucket, k: string): boolean
        • Parameters

          Returns boolean

    Returns boolean

filter

  • Parameters

    • func: (v: Bucket, k: string) => boolean
        • (v: Bucket, k: string): boolean
        • Parameters

          Returns boolean

    Returns Bucket[]

find

  • find(func: (v: Bucket, k: string) => boolean): undefined | Bucket
  • Parameters

    • func: (v: Bucket, k: string) => boolean
        • (v: Bucket, k: string): boolean
        • Parameters

          Returns boolean

    Returns undefined | Bucket

first

  • Returns undefined | Bucket

forEach

  • forEach(func: (v: Bucket, k: string, map: Map<string, Bucket>) => void, thisArg?: any): void
  • Parameters

    • func: (v: Bucket, k: string, map: Map<string, Bucket>) => void
        • Parameters

          Returns void

    • Optional thisArg: any

    Returns void

get

  • get(key: string): undefined | Bucket
  • Parameters

    • key: string

    Returns undefined | Bucket

has

  • has(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

insert

  • insert(bucket: Bucket): void

join

  • join(separator?: string): string
  • Parameters

    • Optional separator: string

    Returns string

keys

  • keys(): IterableIterator<string>
  • Returns IterableIterator<string>

map

  • map(func: (v: Bucket, k: string) => any): any[]
  • Parameters

    • func: (v: Bucket, k: string) => any
        • Parameters

          Returns any

    Returns any[]

reduce

  • reduce(func: (intial: any, v: Bucket) => any, initialValue?: any): any
  • Parameters

    • func: (intial: any, v: Bucket) => any
        • (intial: any, v: Bucket): any
        • Parameters

          Returns any

    • Optional initialValue: any

    Returns any

resetExpire

  • resetExpire(bucket: Bucket): void

set

  • Parameters

    Returns BucketCollection

setExpire

  • Parameters

    • value: number

    Returns BucketCollection

setIntervalTimeout

  • Parameters

    • value: number

    Returns BucketCollection

some

  • some(func: (v: Bucket, k: string) => boolean): boolean
  • Parameters

    • func: (v: Bucket, k: string) => boolean
        • (v: Bucket, k: string): boolean
        • Parameters

          Returns boolean

    Returns boolean

sort

  • Parameters

    Returns Bucket[]

startInterval

  • startInterval(): void

stopInterval

  • stopInterval(): void
  • Returns void

toArray

  • Returns Bucket[]

toJSON

  • Returns Bucket[]

toString

  • toString(): string
  • Returns string

values

  • values(): IterableIterator<Bucket>
  • Returns IterableIterator<Bucket>

Generated using TypeDoc