Skip to content

Instantly share code, notes, and snippets.

Avatar

Pablo Navarro pnavarrc

  • Act Now Coalition
  • Vancouver, Canada
  • Twitter @pnavarrc
View GitHub Profile
View texas-backfill-2020-09-21.md

Sep 22, 2020

From https://txdshs.maps.arcgis.com/apps/opsdashboard/index.html#/ed483ecd702b4298ab01e8b9cafc8b83

2,078 older case recently reported by labs were included in the statewide total but excluded from statewide and Bexar County new confirmed cases (103).

3 older cases recently reported by labs were included in the statewide total but excluded from statewide and Collin County new confirmed cases (42)

306 older case recently reported by labs were included in the statewide total but excluded from statewide and Dallas County new confirmed cases (465). >

View writing-a-babel-plugin-09.js
const createMergeExpression = (a, b) =>
t.objectExpression([
t.spreadElement(a),
t.spreadElement(b)
]);
View writing-a-babel-plugin-08.js
{
type: "ObjectExpression",
properties: [
{
type: "SpreadProperty",
argument: {
type: "Identifier",
name: "a"
}
},
View writing-a-babel-plugin-07.js
const isUselessRamdaMerge = node =>
t.isCallExpression(node) &&
isRamdaMerge(node.callee) &&
node.arguments.length === 2;
View writing-a-babel-plugion-06.js
const isRamdaMerge = node =>
t.isMemberExpression(node) &&
t.isIdentifier(node.object, { name: "R" }) &&
t.isIdentifier(node.property, { name: "merge" });
View writing-a-babel-plugin-05.js
{
type: "CallExpression",
callee: {
type: "MemberExpression",
object: {
type: "Identifier",
name: "R"
},
property: {
type: "Identifier",
View writing-a-babel-plugin-04.js
export default plugin(babel) {
return {
name: "plugin-name",
ArrowFunctionExpression(path) {
const { node } = path;
// transform the node here
}
}
}
View writing-a-babel-plugin-03.js
// Out
{
type: "FunctionExpression",
params: [
{
type: "Identifier",
name: "n"
}
],
body: {
View writing-a-babel-plugin-02.js
{
type: "VariableDeclaration",
declarators: [
{
type: "VariableDeclarator",
id: {
type: "Identifier",
name: "square"
},
init: {
@pnavarrc
pnavarrc / writing-a-babel-plugin-01.js
Last active Jul 11, 2019
writing-a-babel-plugin-1
View writing-a-babel-plugin-01.js
// In
[1, 2, 3].map(n => n * n);
// Out
[1, 2, 3].map(function(n) { return n * n; });