# mx-ms

> a cool ms package!

Latest version **1.0.0** (published 2021-10-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install mx-ms
pnpm add mx-ms
yarn add mx-ms
bun add mx-ms
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-10-01 |
| First published | 2021-10-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 46.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mxkay |

## Links

- npm: https://www.npmjs.com/package/mx-ms
- npm.io page: https://npm.io/package/mx-ms

## Dependencies (1)

- [ts-node](https://npm.io/package/ts-node.md) ^10.2.1

## Recent versions

- 1.0.0 (latest) — 2021-10-01

## README

# mxms

<img width="100px" src="logo.png">

Mx ms is for converting time into milliseconds, you can also use this for economy commands :D

# Table of contents

| contents |
|----------|
[Examples](#examples)
[Converting](#converting-from-milliseconds)
[Time-Format](#time-format-written-out)
## Examples

```js
mx('2 days')  // 172800000
mx('1d')      // 86400000
mx('10h')     // 36000000
mx('2.5 hrs') // 9000000
mx('2h')      // 7200000
mx('1m')      // 60000
mx('5s')      // 5000
mx('1y')      // 31557600000
mx('100')     // 100
mx('-3 days') // -259200000
mx('-1h')     // -3600000
mx('-200')    // -200
```

### Converting-from-milliseconds

```js
mx(60000)             // "1m"
mx(2 * 60000)         // "2m"
mx(-3 * 60000)        // "-3m"
mx(ms('10 hours'))    // "10h"
```

### Time-Format-Written-Out

```js
mx(60000, { long: true })             // "1 minute"
mx(2 * 60000, { long: true })         // "2 minutes"
mx(-3 * 60000, { long: true })        // "-3 minutes"
mx(ms('10 hours'), { long: true })    // "10 hours"
```

# About
 - mx works for both [Nodejs](https://nodejs.org) and [Html browsers](https://html.com/) aswell
 - If a number is supplied to `ms`, a string with a unit is returned

 # Bugs
 - **Hello! If you have caught a bug in the mx package please join the [mx-discord-server](https://discord.gg/kV36JHt5TM)**
----------------------------------------------------------------------
# Author

 ```js
 const authors = ["MxKay_.#2551"] //on Discord 👑
 console.log(authors);
 //returns the author of mx-ms
 ```
 --------------------------------------------------

---
_Source: https://npm.io/package/mx-ms · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
