lightswitch-js-sdk
Version:
light switch javascript sdk
24 lines (23 loc) • 644 B
JavaScript
import { LogLevel } from './types';
import { LSLogger } from './LSLogger';
const logger = LSLogger(LogLevel.DEBUG);
class LSUser {
userId = '';
properties = new Map();
constructor(userId, properties) {
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;
}
}
export default LSUser;