I hereby claim:
- I am gabro on github.
- I am gabro (https://keybase.io/gabro) on keybase.
- I have a public key ASBZl9AJO-rUEOoKZ98kEhpqYfcs3vlfuC1DA_bwE0FdRgo
To claim this, I am signing this object:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
I hereby claim:
To claim this, I am signing this object:
const arr = { | |
ap(fab, fa) { | |
return fab.reduce((acc, f) => acc.concat(fa.map(f)), []) | |
} | |
} | |
const f = (n) => n * 2 | |
const g = (n) => n + 1 | |
const a1 = [f, g] |
function composeFunctor(f, g) { | |
function map(h, fga) { | |
return f.map(ga => g.map(h, ga), fga) | |
} | |
return { map } | |
} | |
function composeApplicative(f, g) { |
import cats.data.OptionT, cats.std.future._ | |
def findAddressByUserId(id: Long): Future[Option[Address]] = | |
(for { | |
user <- OptionT(findUserById(id)) | |
address <- OptionT(findAddressByUser(user)) | |
} yield address).value |
parser | AST | ES2017 | ES next | |
-----------|:---------------:|:------:|:--------------: | |
acorn | ESTree | ✅ | only stage-4 | |
babylon | Babylon AST | ✅ | ✅ | |
espree | ESTree | ✅ | same as acorn | |
esprima | ESTree | ✅ | ❌ | |
flow | ESTree + custom | ✅ | ✅ | |
TypeScript | TypeScript AST | ✅ | ✅ |
export default function(context) { | |
return { | |
CallExpression(node) { | |
const { callee } = node; | |
if (callee.type === "MemberExpression" && callee.object.name === "console" && callee.property.name === "log") { | |
context.report(node, "Do not use console.log"); | |
} | |
} | |
}; | |
} |
export default function (babel) { | |
const { types: t } = babel; | |
return { | |
visitor: { | |
NumericLiteral(path) { | |
path.node.value += 1 | |
} | |
} | |
}; |
package docs | |
import mdoc.Reporter | |
import mdoc.StringModifier | |
import scala.meta.inputs.Input | |
import java.util.UUID | |
/** Transforms scala code blocks into Scastie snippets | |
* | |
* ==Usage== |
'use strict'; | |
// The module 'vscode' contains the VS Code extensibility API | |
// Import the module and reference it with the alias vscode in your code below | |
import { window, commands, ExtensionContext, Range, Position, TextEditor, workspace, DecorationOptions } from 'vscode'; | |
const decorationType = window.createTextEditorDecorationType({ }) | |
function addDecorations(e: TextEditor) { | |
try { |