import { WebStorage } from '../lib/core/interfaces/webStorage' ; export class StorageStub implements WebStorage { [ name ] : any ; public store : { [ prop ] : any ; } = { } ; get length ( ) : number { return Object . keys ( this . store ) . length ; } clear ( ) { this . store = { } ; } getItem ( key ) { return this . store [ key ] || null ; } key ( index ) { return Object . keys ( this . store ) [ index ] ; } removeItem ( key ) { delete this . store [ key ] ; } setItem ( key , value ) { this . store [ key ] = value ; } }