add Time, reducing some duplication

This commit is contained in:
Zutatensuppe 2021-04-14 19:30:45 +02:00
parent e737015d7e
commit b6999e4f1f
7 changed files with 70 additions and 85 deletions

View file

@ -69,19 +69,6 @@ export const shuffle = (
return arr
}
export const timestamp = () => {
const d = new Date();
return Date.UTC(
d.getUTCFullYear(),
d.getUTCMonth(),
d.getUTCDate(),
d.getUTCHours(),
d.getUTCMinutes(),
d.getUTCSeconds(),
d.getUTCMilliseconds(),
)
}
function encodeShape(data) {
if (typeof data === 'number') {
return data
@ -224,7 +211,6 @@ export default {
choice,
throttle,
shuffle,
timestamp,
encodeShape,
decodeShape,