Skip to content

Instantly share code, notes, and snippets.

View clicman's full-sized avatar
🌏

Clicman clicman

🌏
  • CTO at Savl GmbH
  • Almaty, Kazakhstan
View GitHub Profile
@clicman
clicman / enum.babel.js
Created January 31, 2016 19:55 — forked from nathggns/enum.babel.js
Mini enum-like solution. Probably not all that useful;
import { invert, assign, object } from 'lodash';
class Enum {
// Should probably look into using a Symbol for this instead??
static privateKey = '_private';
constructor(map) {
const inverted = invert(map);
const keys = Object.keys(map);