metarhia / metautil

Metarhia utilities 🧰
https://metarhia.com
MIT License
100 stars 24 forks source link

Implement default values in Collector #221

Open tshemsedinov opened 9 months ago

tshemsedinov commented 9 months ago
const default = { userName: 'Marcus', fileName: 'file.txt' };
const ac = collect(['userName', 'fileName'], { default, timeout: 1000 });

If values will not be added in 1 sec, default values will be used

axbuglak commented 9 months ago

If I understand you correctly, default values must be used after timeout after initialization of collector and not after set command

231