This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toHours = time => { | |
const hours = new Date(time).getUTCHours() | |
const minutes = time / 60 / 1000 | |
let showMinutes | |
if (minutes.toFixed(0) === '60') { | |
showMinutes = '00' | |
} else { | |
if (minutes.toFixed(0).length === 1) { | |
showMinutes = '0' + minutes.toFixed(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-fallthrough */ | |
const JapaneseLatin = { | |
ba: "ба", | |
cha: "ця", | |
da: "да", | |
ga: "га", | |
ha: "ха", | |
ja: "дзя", | |
ka: "ка", | |
ma: "ма", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const fs = require('fs'); | |
function getGoogleDriveEmbedLink(links = ``, nameFile = 'output.txt'){ | |
links = links | |
.split('\n') | |
.map(link => link.toString().replace('https://drive.google.com/open?id=','')) | |
.map(hash => `https://drive.google.com/file/d/${hash}/preview`) | |
.reduce((output, input, index) => { | |
return output += `\n${index + 1} | ${input}`; |
NewerOlder