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

typed-duration

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typed-duration - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

6

dist/index.d.ts

@@ -23,6 +23,8 @@ import { millisecondsOf, secondsOf, minutesOf, hoursOf, daysOf } from "./lib";

};
valueFrom: (time: import("./lib").MaybeTimeDuration) => number;
valueOf: (time: import("./lib").MaybeTimeDuration) => string;
value: {
from: (time: import("./lib").MaybeTimeDuration) => number;
of: (time: import("./lib").MaybeTimeDuration) => string;
};
isTypedDuration: (maybeTypedDuration: any) => maybeTypedDuration is import("./lib").TimeDuration;
};
export type { Milliseconds, Seconds, Minutes, Hours, Days, TimeDuration, MaybeTimeDuration, } from "./lib";

@@ -25,5 +25,7 @@ "use strict";

},
valueFrom: lib_1.valueFrom,
valueOf: lib_1.valueOf,
value: {
from: lib_1.valueFrom,
of: lib_1.valueOf
},
isTypedDuration: lib_1.isTypedDuration
};

@@ -18,3 +18,3 @@ "use strict";

*/
exports.valueOf = (time) => `${time}${exports.isTypedDuration(time) ? time.unit : ""}`;
exports.valueOf = (time) => `${exports.valueFrom(time)}${exports.isTypedDuration(time) ? time.unit : ""}`;
const isSeconds = (maybeSeconds) => exports.isTypedDuration(maybeSeconds) && maybeSeconds.type === "SECONDS";

@@ -21,0 +21,0 @@ const isMilliseconds = (maybeMilliseconds) => exports.isTypedDuration(maybeMilliseconds) &&

{
"name": "typed-duration",
"version": "1.0.6",
"version": "1.0.7",
"description": "Zero-dependency typed duration library for JavaScript",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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