var FastMap = require('./fast')
var someMap = FastMap()
This file contains hidden or 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 ext = (...suffix) => new RegExp(`\\.(?:${ suffix.join('|') })(?:[?#].*)?$`) | |
const loaders = [ | |
// Traditional cases | |
{ test: ext('css'), loaders: ['style', 'css'] }, // single | |
{ test: ext('js', 'jsx', 'es6'), loaders: ['babel'] }, // multiple | |
// Complex case: Font-Awesome adds query strings and/or hashs to files | |
{ test: ext('otf', 'eot', 'svg', 'ttf', 'woff', 'woff2'), loaders: ['file?name=[name].[ext]'] }, | |
] |
This file contains hidden or 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
--- | |
parser: babel-eslint | |
ecmaFeatures: | |
modules: true | |
env: | |
es6: true | |
browser: true | |
node: true |
This file contains hidden or 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
export const READ_ONLY = 1 | |
export const DONT_ENUM = 2 | |
export const DONT_DELETE = 4 | |
export function InstallFunctions(object, attributes, functions) { | |
for (let i = 0; i < functions.length; i += 2) { | |
let field = functions[i] | |
let value = functions[i + 1] | |
AddNamedProperty(object, field, value, attributes) |
This file contains hidden or 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
// Curiosity #1 | |
// ------------ | |
function dart() { | |
this.x = 0; | |
delete this.x; | |
} | |
var A = new dart; |
This file contains hidden or 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 Obj(x) { | |
if (typeof x !== 'number') throw new Error() | |
Object.defineProperty(this, 'x', {value: x}) | |
} | |
var a = new Obj(1) | |
var b = new Obj(2) | |
// Do `a` and `b` have the same hidden class in v8? | |
// |
This file contains hidden or 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
alias d8ir="d8 \ | |
--trace-hydrogen \ | |
--trace-phase=Z \ | |
--trace-deopt \ | |
--code-comments \ | |
--hydrogen-track-positions \ | |
--redirect-code-traces \ | |
--redirect-code-traces-to=code.asm" |
This file contains hidden or 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
class Listener { | |
constructor(fn, ctx) { | |
this.fn = fn | |
this.ctx = ctx | |
} | |
} | |
class Emitter { | |
listen(fn, ctx) { | |
this.listeners.push(new Listener(fn, ctx)) |
This file contains hidden or 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
.grid { | |
display: flex; | |
flex-direction: row; | |
flex-wrap: wrap; | |
} | |
.grid-col--auto, | |
.grid-col--1, | |
.grid-col--2, | |
.grid-col--3, |