Skip to content

Instantly share code, notes, and snippets.

View mrtnbroder's full-sized avatar
🕶️
λ

Martin Broder mrtnbroder

🕶️
λ
View GitHub Profile
@DrBoolean
DrBoolean / fp_arch.js
Last active October 27, 2020 09:57
OO => FP architecture refactor
// Simple example, but the idea holds for more complex objects.
/* 1) Start with OO */
// user.js
class User {
constructor(firstName, lastName, email) {
this.firstName = firstName
this.lastName = lastName
@mrcoles
mrcoles / detect-autoplay.js
Created May 8, 2013 01:25
A script to detect browser support for the autoplay attribute on the HTML5 Audio element.
// Detect autoplay
// ---------------
// This script detects whether the current browser supports the
// autoplay feature for HTML5 Audio elements, and it sets the
// `AUTOPLAY` variable accordingly.
// Used in the Meteor app [PicDinner](http://picdinner.com)