import { Locker } from 'angular-safeguard'; import { Injectable } from '@angular/core'; declare var window: any; export const IS_DEV_MODE : Boolean = window.location.href.startsWith("http://localhost"); @Injectable() export class SeCurisSession { sessionData: any = {} constructor(private store: Locker) { } public get(key: string): any { return this.sessionData[key]; } public exists(key: string): boolean { return this.sessionData[key] != undefined; } public set(key: string, value: any): void { this.sessionData[key] = value; } public remove(key: string) : void { delete this.sessionData[key]; } }