Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clocker

Package Overview
Dependencies
Maintainers
3
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clocker - npm Package Compare versions

Comparing version 1.16.6 to 1.16.7

7

lib/index.js

@@ -380,4 +380,4 @@ const toStamp = require('./util').toStamp

try {
var startDate = getDate(start)
value.end = getDate(end)
var from = strftime('%F %T', getDate(start))
} catch (err) {

@@ -387,2 +387,7 @@ return cb(err)

if (value.end < startDate) {
return cb(new Error(`Start date ${start} is greater than end date ${end}.`))
}
var from = strftime('%F %T', startDate)
var type = value.type

@@ -389,0 +394,0 @@ var pkey = 'time!' + from

2

package.json
{
"name": "clocker",
"version": "1.16.6",
"version": "1.16.7",
"description": "track project hours",

@@ -5,0 +5,0 @@ "bin": {

@@ -680,3 +680,3 @@ const test = require('tape')

test('add', function (t) {
t.plan(3)
t.plan(4)

@@ -723,5 +723,4 @@ t.test('Date arguments', function (t) {

}
var end = new Date('2018-01-01')
clocker.add('2 hours ago', end, data, function (err, stamp) {
clocker.add('yesterday 1:00', '2 minutes ago', data, function (err, stamp) {
t.notOk(err)

@@ -732,3 +731,3 @@ t.ok(stamp)

t.notOk(err)
t.deepEqual(data2, mockup(stamp, data, { end: end }))
t.deepEqual(data2, mockup(stamp, data, { end: data2.end }))

@@ -741,2 +740,14 @@ clocker.close(function () {

})
t.test('error for end < start', function (t) {
var clocker = initializeClocker()
clocker.add('02:00', '01:00', function (err) {
t.ok(err)
clocker.close(function () {
t.end()
})
})
})
})

@@ -743,0 +754,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc