UNPKG

serverless-spy

Version:

CDK-based library for writing elegant integration tests on AWS serverless architecture and an additional web console to monitor events in real time.

18 lines (17 loc) 347 B
export class InMemoryStorage { constructor(store = {}) { this.store = store; } getItem(key) { if (key in this.store) { return this.store[key]; } return null; } removeItem(key) { delete this.store[key]; } setItem(key, value) { this.store[key] = value; } }