Skip to content

Instantly share code, notes, and snippets.

View marcoturi's full-sized avatar
🎯
Focusing

Marco Turi marcoturi

🎯
Focusing
  • Nearform
  • Turin, Italy
  • 03:15 (UTC +02:00)
  • LinkedIn in/marcoturi
View GitHub Profile
@marcoturi
marcoturi / toogle-model-generator.ts
Last active June 17, 2017 14:28
Feature Toogle model generator
import { forEach } from 'lodash';
/**
* @author Marco Turi <marco.turi@hotmail.it>
* @author Stefano Tedeschi <stefano.tedeschi@protechstudio.it>
* This function generates an object composed by N elements (states).
* Every element is a boolean and only one of them could be true.
* This is usefull if you want to implement for example a TAB menager
* where the user can active only one tab/page/component.
* @example