4 ms·
hmm, did a naive quick speed test. Man, this lib is extremely expensive... 500 times slower than doing the same comparison in vanilla JS const num= 74; ( (
by devman2 8y ago
hmm, did a naive quick speed test. Man, this lib is extremely expensive... 500 times slower than doing the same comparison in vanilla JS
const num= 74;
( (typeof num === 'number') && (num > -1 && num < 101) && (num % 2 === 0) && (num !== 32) )
compared to their first example:
v8n().number().between(0, 100).even().not.equal(32).test(74);
- anonytrary 8y agoWelcome to your average Javascript package -- does something trivial in the most over-engineered and expensive way imaginable.