mirror of
https://github.com/iptv-org/epg
synced 2025-12-20 20:37:00 -05:00
Make code prettier
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
dayjs.extend(utc)
|
||||
|
||||
const date = {}
|
||||
|
||||
date.getUTC = function (d = null) {
|
||||
if (typeof d === 'string') return dayjs.utc(d).startOf('d')
|
||||
|
||||
return dayjs.utc().startOf('d')
|
||||
}
|
||||
|
||||
module.exports = date
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
dayjs.extend(utc)
|
||||
|
||||
const date = {}
|
||||
|
||||
date.getUTC = function (d = null) {
|
||||
if (typeof d === 'string') return dayjs.utc(d).startOf('d')
|
||||
|
||||
return dayjs.utc().startOf('d')
|
||||
}
|
||||
|
||||
module.exports = date
|
||||
|
||||
@@ -3,11 +3,11 @@ const { gzip, ungzip } = require('node-gzip')
|
||||
const zip = {}
|
||||
|
||||
zip.compress = async function (string) {
|
||||
return gzip(string)
|
||||
return gzip(string)
|
||||
}
|
||||
|
||||
zip.decompress = async function (string) {
|
||||
return ungzip(string)
|
||||
return ungzip(string)
|
||||
}
|
||||
|
||||
module.exports = zip
|
||||
|
||||
Reference in New Issue
Block a user