open-index/open-npm huggingface dataset:
npm package: @feltmaps/benchmarking
Description: A benchmarking tool for JS code
Author: @ibesora
Latest version: 1.1.0

# Felt benchmarking

This package allows to benchmark javascript code on the browser.

## How it works

Runs `Benchmark` implementations and measures the time it takes to execute a single run. If that run takes less than 5ms (which is the minimum resolution of `performance.now()`, see [Performance.now() on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now)), we keep incrementing the number of iterations _iterationsPerSample_ per run until it takes more than 5ms. Once that happens, we capture 210 samples via running _iterationsPerSample_ iterations per sample

### Create a benchmark

```javascript
export default class FilterCreate extends Benchmark {
  bench() {
    findPrimes(1000);
  }
}
```

### Create a benchmark suite

```javascript
const suite = new BenchmarkingSuite();
```

### Add benchmarks to the suite

```javascript
suite.register("Filter", "version 1", new FilterCreate());
```

Adding multiple benchmarks with the same name but different version will compare them in the results website

```javascript
suite.register("Filter", "version 1", new FilterCreate());
suite.register("Filter", "version 2", new FilterCreate2());
```

### Run the suite

```javascript
suite.run();
```

See [index.html](./example/index.html) and [benchmarks.ts](./example/benchmarks/benchmarks.ts) for website and js code examples

### Results

Results show a statistics table, a plot with various statistics (quartiles, median, mean, trimmed mean) and a regression plot.

The correlation in the table should be almost 1, if it's less than 0.99 a ⚠️ sign is shown. If correlation is less than 0.9 a ☠ sign is shown because results are not valid.

![alt text](./img/comparison.png)

Based on [Maplibre's benchmarking tool](https://github.com/maplibre/maplibre-gl-js/tree/main/bench)
npm package: @feltmaps/js-sdk
Description: An SDK for Felt maps
Author: Felt
Latest version: 1.10.0

# @feltmaps/js-sdk

An SDK for Felt maps.

- [Documentation](https://developers.felt.com/js-sdk)
- [API Reference](https://developers.felt.com/js-sdk-api-reference)

## Quickstart

Install the SDK using your preferred package manager:

```bash
npm install @feltmaps/js-sdk
```

Embed a Felt map in your app and use the SDK to control it:

```typescript
import { Felt } from "@feltmaps/js-sdk";

const map = await Felt.embed(
  document.querySelector("#container"),
  "FELT_MAP_ID",
);
const layers = await map.getLayers();
const elements = await map.getElements();
map.setViewport({
  center: {
    latitude: 37.8044,
    longitude: -122.271,
  },
  zoom: 13,
});
```