Skip to content

Instantly share code, notes, and snippets.

View pnavarrc's full-sized avatar

Pablo Navarro pnavarrc

  • Act Now Coalition
  • Vancouver, Canada
  • 19:18 (UTC -08:00)
View GitHub Profile
{
type: "VariableDeclaration",
declarators: [
{
type: "VariableDeclarator",
id: {
type: "Identifier",
name: "square"
},
init: {
// In
[1, 2, 3].map(n => n * n);
// Out
[1, 2, 3].map(function(n) { return n * n; });
@pnavarrc
pnavarrc / README.md
Last active July 2, 2019 15:30
Code examples for Writing a Babel Plugin

Writing a Babel Plugin to Refactor Code

Babel is a tool to transform code. It’s most commonly used to transform “modern” JavaScript into code that’s compatible with older browsers. Babel allows us, for example, to use arrow functions (ES2015) during development and have them transformed to anonymous functions at build-time.

// In
[1, 2, 3].map(n => n * n);

// Out
[1, 2, 3].map(function(n) { return n * n; });
@pnavarrc
pnavarrc / README.md
Last active July 1, 2021 09:28
GitHub GraphQL API
We couldn’t find that file to show.
We couldn’t find that file to show.
We couldn’t find that file to show.
@pnavarrc
pnavarrc / README.md
Last active August 30, 2016 18:06
Voronoi Generated Network

Automatic generation of flat network structure with the Voronoi algorithm.

@pnavarrc
pnavarrc / README.md
Last active August 30, 2016 18:07
Force Vertical Gravity

Force layout with vertical gravity.

We couldn’t find that file to show.