Skip to content

Instantly share code, notes, and snippets.

@Fil
Fil / .block
Last active May 16, 2017 14:42
Why Reykjavík?
license: gpl-3.0
var turf = require('turf')
var tilebelt = require('tilebelt')
// put your own data here
var stargazers = [<list of lat lons>]
// this sets the size of your grid cells; each grid cell is a map tile at the given zoom
var zoom = 12
// tiles is a hash we can quickly add new tiles too and increment counts
var tiles = {}
@ghostwords
ghostwords / .eslintrc
Last active February 13, 2024 07:35 — forked from cletusw/.eslintrc
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"arrowFunctions": false, // enable arrow functions
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"classes": false, // enable classes
"defaultParams": false, // enable default function parameters
"destructuring": false, // enable destructuring
@bendc
bendc / functional-utils.js
Last active September 15, 2023 12:12
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)