Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bytenik committed Jul 5, 2024
1 parent 69aeb4b commit 095b8ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions timestamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ const format = require('./format');
* - { timestamp: true } // `new Date.toISOString()`
* - { timestamp: function:String } // Value returned by `timestamp()`
*/
module.exports = format((info, opts = {propName: 'timestamp'}) => {
module.exports = format((info, opts = { propName: 'timestamp' }) => {
if (opts.format) {
info[opts.propName] = typeof opts.format === 'function'
? opts.format()
: fecha.format(new Date(), opts.format);
}

if (!info[propName]) {
if (!info[opts.propName]) {
info[opts.propName] = new Date().toISOString();
}

Expand Down

0 comments on commit 095b8ba

Please sign in to comment.