open-index/open-npm huggingface dataset:
npm package: @jawg/maplibre-gl-mapload
Description: A library for using JawgMaps with MapLibre
Author: Jawg Maps
Latest version: 1.0.0

# maplibre-gl-mapload

[![npm](https://img.shields.io/npm/v/@jawg/maplibre-gl-mapload)](https://www.npmjs.com/package/@jawg/maplibre-gl-mapload)

Use to support JawgMaps mapload pricing with [MapLibre GL JS](https://github.com/maplibre/maplibre-gl-js).

> Note that your account requires the per-mapload pricing to be enabled.
> Please contact us at [contact@jawg.io](mailto:contact@jawg.io) for more information.

## Install

Available via npm as the package [@jawg/maplibre-gl-mapload](https://www.npmjs.com/package/@jawg/maplibre-gl-mapload).
To use this librarie you also need to install [MapLibre GL JS](https://maplibre.org/maplibre-gl-js-docs/api/).

```sh
npm i maplibre-gl @jawg/maplibre-gl-mapload
```

or

```sh
yarn add maplibre-gl @jawg/maplibre-gl-mapload
```

Alternatively you may add the umd package directly to the html document using the unpkg link.

```html
<!--MapLibre GL JS-->
<script src="https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.js"></script>
<link
  href="https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.css"
  rel="stylesheet"
/>
<!--Jawg MapLoad-->
<script src="https://unpkg.com/@jawg/maplibre-gl-mapload@1.0.0/dist/maplibre-gl-mapload.js"></script>
```

When adding via unpkg, the map can be accessed with `Jawg.Map`.

## Usage

```javascript
import Jawg from "@jawg/maplibre-gl-mapload";
import maplibregl from "maplibre-gl";

// Create a map object using Jawg.Map instead of maplibregl.Map. Then use it as a normal maplibregl.Map.
const map = new Jawg.Map({
  container: "map",
  style:
    "https://api.jawg.io/styles/jawg-streets.json?access-token=<YOUR_ACCESS_TOKEN>",
  zoom: 2,
  center: [2.3210938, 48.7965913],
});

map.addControl(
  new maplibregl.NavigationControl({
    visualizePitch: true,
    showZoom: true,
    showCompass: true,
  })
);
```

## Feedback

Please submit an [issue](https://github.com/jawg/maplibre-gl-mapload/issues) for new features or when something is not working properly.
npm package: @jawg/types
Description: Shared TypeScript definitions for Jawg Maps projects
Author: Jawg Maps
Latest version: 1.3.0

# types.ts

Shared TypeScript definitions for Jawg Maps projects

[![npm version](https://img.shields.io/npm/v/@jawg/types.svg)](https://www.npmjs.com/package/@jawg/types)
[![Run lint and test](https://github.com/jawg/types.ts/actions/workflows/build.yml/badge.svg)](https://github.com/jawg/types.ts/actions/workflows/build.yml)
[![Publish GitHub Pages](https://github.com/jawg/types.ts/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/jawg/types.ts/actions/workflows/gh-pages.yml)
[![Release NPM Package](https://github.com/jawg/types.ts/actions/workflows/release.yml/badge.svg)](https://github.com/jawg/types.ts/actions/workflows/release.yml)
[![License](https://img.shields.io/github/license/jawg/types.ts)](https://github.com/jawg/types.ts/blob/main/README.md)

## Usage

See all exported types at https://jawg.github.io/types.ts

## Example

Perfect usage in [@jawg/js-loader](https://github.com/jawg/js-loader) [index.d.ts](https://github.com/jawg/js-loader/blob/main/index.d.ts)

```typescript
import { JawgPlaces } from '@jawg/types';

interface Options {
  accessToken: string;
}

export default class JawgJSLoader {
  constructor(options: Options);
  loadJawgPlaces(version?: string): Promise<typeof JawgPlaces>;
}
```
npm package: @jawilx/gen-api
Description: A modern cli tool that auto generate typescript api code from swagger 2 and openapi 3
Author: JawilX
Latest version: 2.7.0

<h1 align="center">@jawilx/gen-api</h1>

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![JSDocs][jsdocs-src]][jsdocs-href]
[![License][license-src]][license-href]

<p align="center">A modern cli tool that auto generate typescript api code from swagger 2 and openapi 3</p>

<pre align="center">pnpm i -D @jawilx/gen-api</pre>

## Usage

1. update package.json
```json
{
  // ...
  "scripts": {
    // ...
    "genapi:init": "gen-api init",
    "genapi": "gen-api now"
  }
}
```

2. init api.config.ts
<pre align="center">pnpm genapi:init</pre>

3. set api.config.ts apiList swaggerUrl ([How to get swaggerUrl](https://apifox.com/help/api-docs/importing-api/swagger#url-%E5%AF%BC%E5%85%A5))

4. generate
<pre align="center">pnpm genapi</pre>

## License

[MIT](./LICENSE) License © 2023-PRESENT [JawilX](https://github.com/JawilX)

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/@jawilx/gen-api?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/@jawilx/gen-api
[npm-downloads-src]: https://img.shields.io/npm/dm/@jawilx/gen-api?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/@jawilx/gen-api
[bundle-src]: https://img.shields.io/bundlephobia/minzip/@jawilx/gen-api?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=@jawilx/gen-api
[license-src]: https://img.shields.io/github/license/jawilx/gen-api.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/jawilx/gen-api/blob/main/LICENSE
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
[jsdocs-href]: https://www.jsdocs.io/package/@jawilx/gen-api
npm package: @jawis/jab
Description: Collection of basic utilities for JavaScript
Latest version: 0.38.0

# Basic utilities for JavaScript

Collection of basic utilities for JavaScript. Can be used in both node and web
projects.

## Installation

```
npm i @jawis/jab
```

## Usage

**Documentation**: Everything is developed in TypeScript, so type declarations
are the best place to find information about the individual functions and
classes.

Here are some highlights:

- **getProtoChain**: Returns the prototype chain of an object as an array of
  'class' names.

## Build

All imports are side effect free. So this library is ideal for tree-shaking.

## Known issues

- capture
  - Handles binary data superficially.
  - Sparsity in arrays is not preserved.
  - Non-enumerable properties is not preserved.

## Related work

- Capture:
  [Several](https://npmtrends.com/@stdlib/utils-native-class-vs-arson-vs-error-to-json-vs-lave-vs-serialize-error-vs-serialize-javascript-vs-uneval)

## License

MIT
npm package: @jawis/jab-express
Description: Collection of utilities for express apps.
Latest version: 0.38.0

# Utilities for express

Collection of utilities for working with express apps.

## Installation

```
npm i jab-express
```

## Usage

**Documentation**: Everything is developed in TypeScript, so type declarations
are the best place to find information about the individual functions and
classes.

Here are some highlights:

### WsPoolController

A pool for handling open web socket connections. Note that the pool only will
manage clients at the specified url. Clients that connect to another url can be
managed by another pool

```js
import express from "express";
import { WsPoolController } from "@jawis/jab-express";

// Create the pool

const wsPool = new WsPoolController(deps);

// Listener for web socket messages.

const onMessage = (msg, nws) => {
  // do something with the `msg` that comes from the web socket: `nws`

  //fx send a message to all clients

  wsPool.send("ping");
};

// Us the pool to make a upgrade handler

const onWsUpgrade = wsPool.makeUpgradeHandler(onMessage);

// Make a router and listen to web socket connections at the url: '/ws'

const router = express.Router();

router.ws("/ws", onWsUpgrade);
```

### Small utilities

- `makeApp`
- `makeRoute`

## Build

All imports are side effect free. So this library is ideal for tree-shaking.

## Related work

## License

MIT
npm package: @jawis/jab-node
Description: Collection of utilities for node environment.
Latest version: 0.38.0

# Utilities for nodejs.

Collection of utilities for working with nodejs environment.

## Installation

```
npm i @jawis/jab-node
```

## Known issues

- `WatchableProcessPreloader` sends required files too often. It only need files
  when they are loaded, not each time they are required.

## License

MIT
npm package: @jawis/jab-react
Description: Collection of utilities for react.
Latest version: 0.38.0

# Utilities for react.

Collection of utilities for working with react.

## Installation

```
npm i @jawis/jab-react
```

## Known issues

- BrowserWebSocket is superfluously implemented
- BrowserWebSocket reconnects too much, and causes the browser to make
  'exponential' increasing timeouts.
- ScrollbarTail is broken in React 17.

## Related work

- [react-use](https://www.npmjs.com/package/react-use)

## License

MIT
npm package: @jawis/jacs
Description: JavaScript compile service for Node.js worker threads
Latest version: 0.38.0

# Compile service for Node.js worker threads

Delivers transpiled TypeScript to a Node.js worker thread.

## Installation

```
npm i @jawis/jacs
```

## Usage

```js
import { mainProvToConsole } from "@jawis/jab-node";
import { makeMakeJacsWorkerBee } from "@jawis/jacs";

const mainProv = mainProvToConsole();

const makeBee = makeMakeJacsWorkerBee(mainProv);

const bee = makeBee({
  filename: "/path/to/my-script.ts",
  onMessage: console.log,
  onStdout: console.log,
  onStderr: console.log,
  onError: console.log,
  onExit: (status) => {
    //needed because jacs blocks exit, by watching files for change
    process.exit();
  },
  finally: mainProv.finally,
});
```

## Features

- Transpiles TypeScript files.
- Watch files for changes, so the latest
- Activates source map support.
- Replaces import aliases with tsconfig-paths.

## How it works

- Jacs creates a worker thread, and makes it ready for execution.
- When the executed script requires a source file, the following happens:
  1.  It requests the file from the main thread and sleeps by `Atomics.wait`
  2.  Jacs transpiles the file and caches it.
  3.  Stores the file in shared memory, and wakes the worker thread.
  4.  The worker thread continues as if the source code came from disc.

## Limitations

- Only support transpile.
- Only support a single tsconfig.json. Because tsconfig-paths works that way.
- Hardcoded to emit CommonJS modules.

## License

MIT
npm package: @jawis/jarun
Description: Test runner for JavaScript, and more.
Latest version: 0.38.0

# Jarun test runner

Test runner for JavaScript, and more.

## Installation

```
npm i jarun
```

## Usage

## Known issues

## Related work

- [jest](https://www.npmjs.com/package/jest)
- [mocha](https://www.npmjs.com/package/mocha)
- [jasmine-core](https://www.npmjs.com/package/jasmine-core)
- [karma](https://www.npmjs.com/package/karma)
- [tape](https://www.npmjs.com/package/tape)

[npmtrends.com](https://npmtrends.com/alsatian-vs-ava-vs-jasmine-core-vs-jest-vs-karma-vs-mocha-vs-qunit-vs-tape)

## License

MIT
npm package: @jawish/rollup-plugin-twig
Description: Rollup plugin to import Twig templates as a compiled function.
Author: Jawish Hameed
Latest version: 0.0.1

# rollup-plugin-twig

[Rollup](https://github.com/rollup/rollup) plugin that pre-compiles [Twig.js](https://github.com/twigjs/twig.js) templates.

## Installation

NPM:
```sh
npm install --save-dev rollup-plugin-twig
```

Yarn:
```sh
yarn add --dev rollup-plugin-twig
```

## Usage

Update `rollup.config.js`:
```js
import { rollup } from 'rollup';
import strip from 'rollup-plugin-twig';

export default {
  input: 'src/index.js',
  output: [
    {
      format: 'cjs',
      file: 'dist/my-lib.cjs.js'
    }
  ],
  plugins: [
    twig()
  ]
};
```

Create your Twig template files `*.twig`. e.g.:

```html
<div>{{ name }}</div>
```

Import your Twig templates where needed. e.g:

```js
import template from './template.twig'

const data = { name: 'John Doe' }
console.log(template.render(data)) // <div>John Doe</div>
```

## Options

Plugin options you can pass :

* `include`
Minimatch or array of minimatch with files that should be included by default.

* `exclude`
Minimatch or array of minimatch with files that should be excluded by default.
* `minify`
Minify the template using `html-minifier`. Default: `true`.

* `minifyOptions`
Options to configure `html-minifier`.
Default options:
```js
{
  removeComments: true,
  collapseWhitespace: true,
  collapseBooleanAttributes: true,
  decodeEntities: true,
  html5: true,
  keepClosingSlash: true,
  minifyCSS: true,
  minifyJS: true,
  minifyURLs: true,
}
```

## License

MIT [License](LICENSE.md)