- Install Xcode (Avaliable on the Mac App Store)
- Install Xcode Command Line Tools (Preferences > Downloads)
- Install depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
sudo nano ~/.bash_profile
- Add
export PATH=/path/to/depot_tools:"$PATH"
(it's important that depot_tools comes first here)
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 N = 10000; | |
const FOO = 'foo'; | |
function test(fn) { | |
var result; | |
for (var i = 0; i < N; ++i) result = fn(); | |
return result; | |
} | |
test(x => x); |
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' | |
var h1 = function (tag, props, children) { | |
return {tag: tag, props: props, children: children} | |
} | |
var h2 = function (tag, props, children) { | |
return {tag: tag, props: props, children: children, 9: ''} | |
} |
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 prng = ((seed, size, value = seed % size) => () => ((value = value * 16807 % size - 1) - 1) / size)(4022871197, 2147483647) |
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
<script type="module"> | |
import {h, render} from '//unpkg.com/dyo?module' | |
function handleLocation ({href} = location, {origin} = location) { | |
return href.replace(origin, '') | |
} | |
function handleClick (event, {href, children}, state, context) { | |
context.forceUpdate(history.pushState(event.preventDefault(), document.title = children, href)) | |
} |
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
// currentTarget is the current value i.e null/node while target is always node | |
function subscribe ({timeout = setTimeout(() => {}), target, currentTarget}, props, state, context) { | |
// when a function is returned it is used when the ref is unmounted. | |
return () => cleartimeout(returnValue) | |
} |
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
// currentTarget is the current value i.e null/node while target is always the node the ref was attached to | |
// or vice-versa if matching event target/currentTarget sementics is of any merit. | |
function subscribe ({currentTarget, target, timeout = setInterval(() => {})}) { | |
assert(currentTarget instanceof Node || current === null) | |
assert(target instanceof Node) | |
// when a function is returned it is used when the ref is unmounted. | |
return () => setInterval(timeout) | |
} |
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
// Copyright 2013-2019 Benedikt Meurer | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// <https://www.apache.org/licenses/LICENSE-2.0> | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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
Per https://code.google.com/p/v8/codesearch#v8/trunk/src/runtime.cc | |
%CreateSymbol | |
%CreatePrivateSymbol | |
%CreateGlobalPrivateSymbol | |
%NewSymbolWrapper | |
%SymbolDescription | |
%SymbolRegistry | |
%SymbolIsPrivate |
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
import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js' | |
import {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js' | |
import {copy, tokenize} from './Tokenizer.js' | |
import {serialize} from './Serializer.js' | |
import {prefix} from './Prefixer.js' | |
/** | |
* @param {function[]} collection | |
* @return {function} | |
*/ |