Skip to content

Instantly share code, notes, and snippets.

View myDisconnect's full-sized avatar

Andrius Versockas myDisconnect

  • Eskimi
  • Lithuania
View GitHub Profile
@myDisconnect
myDisconnect / ClassUtils.scala
Last active April 10, 2022 17:21 — forked from carymrobbins/pretty-print.scala
Pretty print Scala case classes and other data structures.
/*
* Original author's work: @see https://gist.github.com/carymrobbins/7b8ed52cd6ea186dbdf8
* - 2019-07-18 Added support for Option and Map types
* - 2019-11-25 Fixed Option types spacing
*/
object ClassUtils {
/**
* Pretty prints a Scala value similar to its source represention.
* Particularly useful for case classes.
const isAutoplaySupported = function (callback) {
var timeout;
var waitTime = 200;
var retries = 5;
var currentTry = 0;
var elem = document.createElement('video');
var elemStyle = elem.style;
function testAutoplay(arg) {
currentTry++;