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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
export function waitForSubscription<TResult, TContext>(schema: GraphQLSchema, subscription: DocumentNode, context: TContext) { | |
return new Promise<TResult | ReadonlyArray<GraphQLError>>(async resolve => { | |
const iterator = await subscribe(schema, subscription, {}, context) | |
if (isAsyncIterable(iterator)) { | |
for await (const next of iterator) { | |
const val: ExecutionResult<TResult> = next | |
if (val.errors) resolve(val.errors) |
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
<template> | |
<div> | |
<div class="modal-mask" v-if="show" @click="requestClose && requestClose()"> | |
<div class="modal-wrapper"> | |
<div class="modal-container" @click.stop :style="{width: width + 'px'}"> | |
<slot></slot> | |
</div> | |
</div> | |
</div> | |
</div> |
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"/> | |
<title>Array() vs new Array()</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
Show hidden characters
{ | |
"presets": ["es2015", "stage-2"], | |
"plugins": ["transform-runtime", "es6-promise", "transform-vue-jsx", "transform-flow-strip-types"], | |
"comments": false | |
} |
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
var i = 0; | |
var router = new (Backbone.Router.extend({ | |
before: { | |
'someotherroute': function() { | |
}, | |
'': function(fragment,args,next) { | |
setTimeout(function() { |
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
{ | |
"Berachos":{ | |
"dappim":"64", | |
"perakim":"9", | |
"mishnayot":[ | |
9, | |
8, | |
6, | |
7, | |
5, |