mfedderly 96f0c2cb06
Enable more lint rules (#2108)
* @typescript-eslint/ban-types

* @typescript-eslint/no-empty-function

* @typescript-eslint/no-inferrable-types

* @typescript-eslint/no-this-alias

* no-case-declarations

* no-cond-assign

* no-dupe-else-if

* no-empty

* no-explicit-any

* no-prototype-builtins

* no-undef

* no-unreachable

* no-useless-escape

* prefer-spread

* comment the eslintrc

* Almost had it

* clearly my js trivia is not good enough today

Co-authored-by: Matt Fedderly <mfedderly@palantir.com>
2021-06-22 18:42:21 -04:00

22 lines
567 B
JavaScript

import Benchmark from "benchmark";
import { point, featureCollection } from "@turf/helpers";
import sample from "./index";
var points = featureCollection([
point(1, 2, { team: "Red Sox" }),
point(2, 1, { team: "Yankees" }),
point(3, 1, { team: "Nationals" }),
point(2, 2, { team: "Yankees" }),
point(2, 3, { team: "Red Sox" }),
point(4, 2, { team: "Yankees" }),
]);
new Benchmark.Suite("turf-sample")
.add("turf-sample", function () {
sample(points, 4);
})
.on("cycle", function (event) {
console.log(String(event.target));
})
.run();