Creates a duration in seconds (converted to milliseconds).
WHY: Provides a more readable way to specify durations in seconds.
number of seconds
milliseconds equivalent
setTimeout(fn, seconds(30)); // 30 seconds = 30000mscache.set('key', value, { ttl: seconds(120) }); // 2 minutes Copy
setTimeout(fn, seconds(30)); // 30 seconds = 30000mscache.set('key', value, { ttl: seconds(120) }); // 2 minutes
Creates a duration in seconds (converted to milliseconds).
WHY: Provides a more readable way to specify durations in seconds.