@stereobot/ms
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

@stereobot/ms

The ms module Stereo uses for music related commands, since the pre-existing module doesn't have a feature we wanted.


Usage

idk why you'd want to use this, but have fun

From an int

const ms = require("@stereobot/ms");

ms(123000); // 2m
ms(123000, { long: true }); // 2 minutes
ms(123000, { full: true }); // 2m 3s
ms(123000, { long: true, full: true }); // 2 minutes 3 seconds

From a string

const ms = require("@stereobot/ms");

ms("2d"); // 172800000
ms("2m 3s"); // 123000
ms("2 minutes 3 seconds"); // 123000
ms("6m 9s"); // 369000
ms("-6m -9s"); // -369000 this also exists, in case you need it?

Project is licensed under a MIT license

Readme

Keywords

Package Sidebar

Install

npm i @stereobot/ms

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

5.35 kB

Total Files

7

Last publish

Collaborators

  • sxmurai