View array-like.mjs
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 { | |
defineProperties, | |
getOwnPropertyDescriptors | |
} = Object; | |
/** | |
* A root Array-like "class" compatible with both es5 and es6 styles | |
*/ | |
export function ArrayLike() { | |
if (!(this instanceof ArrayLike)) { |
View boxed-property.js
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
;(function() { | |
"use strict"; | |
// Utility class to enable extension of objects that cannot use | |
// normal class based inheritance e.g. custom functions | |
// | |
// Simply put, it adds a mixin static that contains all the property | |
// descriptors that class intends to pass on | |
class Mixable { | |
static mixin(target) { |
View index.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Mithril + Mobx"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Mithril + Mobx</title> | |
<script src="https://unpkg.com/mithril/mithril.js"></script> | |
</head> | |
<body> |
View free-fn.js
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'; | |
export function free(fn) { | |
return function() { | |
return this === undefined ? fn.apply(undefined, arguments) : fn.call(undefined, this, ...arguments); | |
} | |
} | |
export function freeRight(fn) { | |
return function() { |
View index.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
View my-page-component.js
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 Shade = Shades; | |
const { Content, Slot } = Shades; | |
function PageFooter(props) { | |
return ( | |
<footer> | |
{props.children} | |
</footer> | |
); | |
} |
View bar.js
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.setters = {}; | |
var __es6__import__ = function(name, setter) { | |
require(name); | |
var resolvedPath = require.resolve(name); | |
require.cache[resolvedPath].dependants.push(module); | |
module.setters[resolvedPath] = setter; | |
}; | |
module.dependants = []; |
View exports.js
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
function createUMEModule(values) { | |
function __ume__() { | |
return typeof values.default !== "function" ? values.default : values.default.apply(this, arguments); | |
} | |
Object.keys(values).forEach(function(name) { | |
Object.defineProperty(__ume__, name, { | |
enumerable: true, | |
configurable: false, | |
get: function() { |
View InlineWorker.js
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
(function(global){ | |
"use strict"; | |
function fnToBlob(fn) { | |
var body = (fn && fn.toString()) || ""; | |
return new Blob([ body.slice(body.indexOf("{") + 1, body.length - 1) ]); | |
} | |
function createWorker(fn) { | |
var blobURL = global.URL.createObjectURL(fnToBlob(fn)), |
View async-templates.js
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
require(traceur.RUNTIME_PATH); | |
function compile() { | |
var tpl = Micro.precompile("ello <%= govna %>") + ""; | |
tpl = [ | |
"(async function() {", | |
tpl.slice(tpl.indexOf("{") + 1, tpl.length - 1), | |
"})();" | |
].join("\n"); |
NewerOlder