New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

basic-ms

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic-ms - npm Package Compare versions

Comparing version
1.0.0
to
1.0.2
+2
-1
index.d.ts

@@ -1,2 +0,2 @@

declare module "node-ms" {
declare module "basic-ms" {
export default function NodeMS(time: string | number, _options?: { long: boolean }): number | string;

@@ -8,2 +8,3 @@

private static isTimeExists(time: string): boolean;
private static parseMilliseconds(milliseconds: number): number;
}

@@ -10,0 +11,0 @@

{
"name": "basic-ms",
"version": "1.0.0",
"version": "1.0.2",
"description": "Basic MS Module.",

@@ -19,4 +19,5 @@ "main": "index.js",

"time",
"timetoms",
"time-to-ms"
"time-to-ms",
"node-ms",
"ms-to-time"
],

@@ -23,0 +24,0 @@ "author": "emirhanbaltas34",

@@ -8,2 +8,8 @@ ![Image](https://img.shields.io/npm/v/basic-ms?color=%2351F9C0&label=basic-ms)

# News
```npm
- TypeScript Error Fixed.
```
# Use

@@ -10,0 +16,0 @@

+10
-8

@@ -103,12 +103,14 @@ const ErrorManager = require("./ErrorManager");

static isTimeExists(time) {
if (time.endsWith("s")) return true;
else if (time.endsWith("m")) return true;
else if (time.endsWith("h")) return true;
else if (time.endsWith("d")) return true;
else if (time.endsWith("w")) return true;
else if (time.endsWith("mo")) return true;
else if (time.endsWith("y")) return true;
else return false;
const args = ["s", "m", "h", "d", "w", "mo", "y"]
for(let arg of args){
if(time.endsWith(arg)) return true;
else return false;
}
}
/**
*
* @param {number} milliseconds
* @returns {number}
*/
static parseMilliseconds(milliseconds) {

@@ -115,0 +117,0 @@ return Math.abs(milliseconds);