qiwi/cyclone

View on GitHub
src/main/ts/registry.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
export class Registry {

  store: { [key: string]: any }

  constructor () {
    this.store = {}
  }

  get (key: string): void {
    return this.store[key]
  }

  add (key: string, value: any): void {
    this.store[key] = value
  }

  remove (key: string): void {
    delete this.store[key]
  }

}