inity
✨ Custom Magic Initializers 🧙
Installation
Yarn
yarn add inity
npm
npm install inity
Usage
; // Sample class that holds a value { thisn = n; }
✨ Initialize many values using destructuring assignment syntax... 🧙
const posX posY velX velY score state = Value0;/* each variable has its own UNIQUE value class */ posXn = 42;console;// 15, 0
💩 ...rather than in a big block...
const posX = 0;const posY = 0;const velX = 0;const velY = 0;const score = 0;const state = 0;