moxystudio/node-proper-lockfile

Should convert retries option to object?

alanshaw opened this issue · 1 comments

Is this meant to be converted to an object if retries is a number?

options.retries = typeof options.retries === 'number' ? { retries: options.retries } : options.retries;

you'll end up with { retries: { retries: 5 } } for example.

Yes it’s correct. We accept a simple number or a more complex retry object, which has a retries field, see: https://github.com/tim-kos/node-retry/blob/master/README.md