UNPKG

mgm

Version:

My generic modules

18 lines (15 loc) 287 B
let map = {}; module.exports = class ThreadLocal { static get(key) { return map[key]; } static put(key, value) { map[key] = value; } static remove(key) { delete map[key]; } static clear() { map = {} } };