Skip to content

Commit

Permalink
Upgrade dev-dependency standard@17
Browse files Browse the repository at this point in the history
  • Loading branch information
fnogatz committed Sep 18, 2022
1 parent 7086d66 commit 8acd11a
Show file tree
Hide file tree
Showing 4 changed files with 1,038 additions and 1,218 deletions.
4 changes: 2 additions & 2 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ function aggregateJson (cmd) {

for (const date in data) {
json.hours.push({
date: date,
date,
hours: Math.round(data[date] / 36) / 100
})
}
Expand Down Expand Up @@ -443,7 +443,7 @@ function add (start, end, cmd) {
clocker = initialize(cmd)

const data = {
end: end
end
}
;['type', 'message'].forEach(function (prop) {
if (cmd[prop]) {
Expand Down
10 changes: 5 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ Clocker.prototype.start = function (data, date, cb) {
const tkey = 'time-type!' + type + '!' + strftime('%F %T', date)
let value
try {
value = addData({ type: type }, data)
value = addData({ type }, data)
} catch (err) {
return cb(err)
}
this.db.batch([
{ type: 'put', key: pkey, value: value },
{ type: 'put', key: pkey, value },
{ type: 'put', key: tkey, value: 0 }
], function (err) {
if (err) {
Expand Down Expand Up @@ -146,7 +146,7 @@ instead.`))
}

const update = {
start: start,
start,
end: new Date(start.getTime() + entry.elapsed * 1000)
}
this.set(id, update, (err, newStamp) => {
Expand Down Expand Up @@ -254,7 +254,7 @@ Clocker.prototype.get = function (id, cb) {
}

const data = Clocker.getDataObject({
key: key,
key,
value: row
})
return cb(null, data)
Expand Down Expand Up @@ -402,7 +402,7 @@ Clocker.prototype.add = function (start, end, data, cb) {
}

this.db.batch([
{ type: 'put', key: pkey, value: value },
{ type: 'put', key: pkey, value },
{ type: 'put', key: tkey, value: 0 }
], function (err) {
if (err) {
Expand Down
Loading

0 comments on commit 8acd11a

Please sign in to comment.