@hyurl/utils
Advanced tools
Comparing version 0.1.25 to 0.1.26
{ | ||
"name": "@hyurl/utils", | ||
"version": "0.1.25", | ||
"version": "0.1.26", | ||
"description": "Utility functions of HyURL collection.", | ||
@@ -26,11 +26,11 @@ "main": "libs/index.js", | ||
"@types/node": "^12.12.21", | ||
"mocha": "^6.2.2" | ||
"mocha": "^6.2.2", | ||
"moment": "^2.24.0" | ||
}, | ||
"dependencies": { | ||
"is-like": "^0.1.4", | ||
"moment": "^2.24.0", | ||
"split-any": "^1.0.1", | ||
"tslib": "^1.10.0", | ||
"tslib": "^1.11.1", | ||
"utf8-length": "0.0.1" | ||
} | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const moment = require("moment"); | ||
exports.default = timestamp; | ||
@@ -18,6 +17,6 @@ function timestamp(input, ms = false) { | ||
else { | ||
let time = moment(input); | ||
return ms ? time.valueOf() : time.unix(); | ||
let date = new Date(input); | ||
return ms ? date.valueOf() : Math.floor(date.valueOf() / 1000); | ||
} | ||
} | ||
//# sourceMappingURL=timestamp.js.map |
Sorry, the diff of this file is not supported yet
63482
4
3
985
- Removedmoment@^2.24.0
- Removedmoment@2.30.1(transitive)
Updatedtslib@^1.11.1