UNPKG

lightswitch-js-sdk

Version:

light switch javascript sdk

26 lines (25 loc) 771 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const types_1 = require("./types"); const LSLogger_1 = require("./LSLogger"); const logger = (0, LSLogger_1.LSLogger)(types_1.LogLevel.DEBUG); class LSUser { constructor(userId, properties) { this.userId = ''; this.properties = new Map(); if (!userId) { throw new Error('Please specify a userId'); } this.userId = userId; if (properties) { Object.entries(properties).forEach((entry) => { const [key, value] = entry; this.properties.set(key, value); }); } } getUserId() { return this.userId; } } exports.default = LSUser;