zertosh / invariant

invariant
MIT License
1.22k stars 70 forks source link

Is there a specific reason to not allow `invariant(cond, message, ...args)` ? #42

Open Sceat opened 4 years ago

Sceat commented 4 years ago

invariant is using a defined number of arguments (a,b,c,d,e,f) imo it should be

invariant(cond, message, ...args) {
    const parsed = message.replace('%s', () => args.shift() || '')
}
Sceat commented 4 years ago

actually #33