mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-12-17 01:19:05 +00:00
update
This commit is contained in:
14
node_modules/parse-ms/index.js
generated
vendored
Normal file
14
node_modules/parse-ms/index.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
module.exports = function (ms) {
|
||||
if (typeof ms !== 'number') {
|
||||
throw new TypeError('Expected a number');
|
||||
}
|
||||
|
||||
return {
|
||||
days: Math.floor(ms / 86400000),
|
||||
hours: Math.floor(ms / 3600000 % 24),
|
||||
minutes: Math.floor(ms / 60000 % 60),
|
||||
seconds: Math.floor(ms / 1000 % 60),
|
||||
milliseconds: Math.floor(ms % 1000)
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user