const groupBy = key => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = obj[key];
objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
return objectsByKeyValue;
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
module.exports = { | |
root: true, | |
env: { | |
browser: true, | |
node: true, | |
}, | |
parser: 'vue-eslint-parser', | |
parserOptions: { | |
parser: '@typescript-eslint/parser', | |
sourceType: 'module', |
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
window.Clipboard = (function(window, document, navigator) { | |
var textArea, | |
copy; | |
function isOS() { | |
return navigator.userAgent.match(/ipad|iphone/i); | |
} | |
function createTextArea(text) { | |
textArea = document.createElement('textArea'); |
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
/** Convert seconds to SMPTE timecode JSON object, example input is html video.currentTime */ | |
function secondsToSMPTE(seconds, framerate) { | |
var f = Math.floor((seconds % 1) * framerate); | |
var s = Math.floor(seconds); | |
var m = Math.floor(s / 60); | |
var h = Math.floor(m / 60); | |
m = m % 60; | |
s = s % 60; | |
return {h: h, m: m, s: s, f: f}; |