open-index/open-npm huggingface dataset:
npm package: @lolpants/env
Description: ![Node.js CI](https://github.com/lolPants/env/workflows/Node.js%20CI/badge.svg?branch=master) [![NPM version](https://img.shields.io/npm/v/@lolpants/env.svg?maxAge=3600)](https://www.npmjs.com/package/@lolpants/env) [![NPM downloads](https://img.shields.i
Author: Jack Baron
Latest version: 0.6.4
Deprecated: use @luludev/env instead

# 🔧 env

![Node.js CI](https://github.com/lolPants/env/workflows/Node.js%20CI/badge.svg?branch=master)
[![NPM version](https://img.shields.io/npm/v/@lolpants/env.svg?maxAge=3600)](https://www.npmjs.com/package/@lolpants/env)
[![NPM downloads](https://img.shields.io/npm/dt/@lolpants/env.svg?maxAge=3600)](https://www.npmjs.com/package/@lolpants/env)

> Dead simple environment variable parsing system
npm package: @lolpants/jogger
Description: Elegant JSON logging system
Author: Jack Baron
Latest version: 0.9.3

# 🏃 Jogger

![Node.js CI](https://github.com/lolPants/jogger/workflows/Node.js%20CI/badge.svg?branch=master)
[![NPM version](https://img.shields.io/npm/v/@lolpants/jogger.svg?maxAge=3600)](https://www.npmjs.com/package/@lolpants/jogger)
[![NPM downloads](https://img.shields.io/npm/dt/@lolpants/jogger.svg?maxAge=3600)](https://www.npmjs.com/package/@lolpants/jogger)

> Elegant JSON logging system

## ⚠️ Warning

**Jogger is still in the pre-release phase.** It may not be particularly optimised, and the public API is still subject to change. Use in production at your own risk.

## 💾 Installation

Jogger is published to the NPM registry as [`@lolpants/jogger`](https://www.npmjs.com/package/@lolpants/jogger). Install it with your NPM client of choice.

## ❓ Concepts

Jogger splits the logging process up into loggers and sinks. Loggers are responsible for parsing fields and outputting formatted JSON log lines to sinks.
Sinks are responsible for sending log lines to various outputs (ie: stdout). One logger can have many sinks, and send each log line to all registered sinks. One sink can be used by many loggers. This has the advantage of allowing multiple loggers to access the same resource (eg: file descriptor) simultaneously.

## 📝 Documentation

All public methods are documented using JSDoc, your IDE should provide you with enough context. Refer to the example below for a basic setup.

## 🚀 Example

Note that by default `debug` and `trace` level logs are discarded. You must manually enable them in each sink's config.

```ts
import { createConsoleSink, createLogger, field } from '@lolpants/jogger'

// Enable debug log level
const consoleSink = createConsoleSink({ debug: true })
const logger = createLogger({
  name: 'app',
  sink: [consoleSink],
})

logger.info({ a: 'b' })
logger.warn({ reason: 'http server down' })
logger.debug({ deep: { x: true, y: false } })
```
npm package: @lolpants/ptimeout
Description: Set a limit on promise execution time
Author: Jack Baron
Latest version: 1.0.3

# ⌛ pTimeout
[![NPM version](https://img.shields.io/npm/v/@lolpants/ptimeout.svg?maxAge=3600)](https://www.npmjs.com/package/@lolpants/ptimeout)
[![NPM downloads](https://img.shields.io/npm/dt/@lolpants/ptimeout.svg?maxAge=3600)](https://www.npmjs.com/package/@lolpants/ptimeout)
[![Build status](https://travis-ci.com/lolPants/pTimeout.svg)](https://travis-ci.com/lolPants/pTimeout)
[![Dependencies](https://img.shields.io/david/lolpants/ptimeout.svg?maxAge=3600)](https://david-dm.org/lolpants/ptimeout)
[![Coverage Status](https://coveralls.io/repos/github/lolPants/pTimeout/badge.svg?branch=master)](https://coveralls.io/github/lolPants/pTimeout?branch=master)

_Set a limit on promise execution time._
Written in TypeScript, compiled down to ES2017 for use in any Node.js >=10.x!

## 💾 Installation
The package is on the NPM registry as `@lolpants/ptimeout`. Simply install it with your NPM client of choice.

## 🔧 Usage
```ts
// Import (CommonJS)
const pTimeout = require('@lolpants/ptimeout')

// Import (ESM)
import pTimeout from '@lolpants/ptimeout'

// Use
const longPromise = () => new Promise(/* something that takes ages */)
await pTimeout(() => longPromise(), 1000 * 10)
// Will throw an error if timeout takes longer than 10s
```
npm package: @lolpants/static-koa-router
Description: Serve static file through koa-router
Author: Owen Calvin
Latest version: 2.0.1

# Serve static file through koa-router
[![Build Status](https://travis-ci.org/OwenCalvin/static-koa-router.svg?branch=master)](https://travis-ci.org/OwenCalvin/static-koa-router)

## Installation
```
npm i static-koa-router
```
```
yarn add static-koa-router
```

### Usage
`Serve(dirPath: string, router: Router, options?: Options)`
You simply need to pass the **dir path** at the first parameter, the **router instance** (koa-router) at the second parameter and optionaly the **options** at third parameter.

##### Options
 - `maxage` Browser cache max-age in milliseconds. defaults to 0
 - `hidden` Allow transfer of hidden files. defaults to false
 - `index` Default file name, defaults to 'index.html'
 - `defer` If true, serves after `return next()`, allowing any downstream middleware to respond first.
 - `gzip`  Try to serve the gzipped version of a file automatically when gzip is supported by a client and if the requested file with .gz extension exists. defaults to true.
 - `br`  Try to serve the brotli version of a file automatically when brotli is supported by a client and if the requested file with .br extension exists (note, that brotli is only accepted over https). defaults to true.
 - `extensions` Try to match extensions from passed array to search for file when no extension is sufficed in URL. First found is served. (defaults to `false`)
 - [setHeaders](https://github.com/koajs/send#setheaders) Function to set custom headers on response.

### Examples

##### Typescript
```javascript
import { Serve } from "static-koa-router";
import * as KoaRouter from "koa-router";
import * as Koa from "koa";
import * as Http from "http";

const app = new Koa();

const router = new KoaRouter({
  prefix: "/public"
});

Serve(`${__dirname}/public`, router);

app.use(router.routes());

const server = Http.createServer(app.callback());

server.listen(1337, "localhost", () => {
  console.log("Server started");
});
```

##### Javascript
```javascript
const { Serve } = require("static-koa-router");
const KoaRouter = require("koa-router");
const Koa = require("koa");
const Http = require("http");

const app = new Koa();

const router = new KoaRouter({
  prefix: "/public"
});

Serve(`${__dirname}/public`, router);

app.use(router.routes());

const server = Http.createServer(app.callback());

server.listen(1337, "localhost", () => {
  console.log("Server started");
});
```

### See also
[koa-static](https://github.com/koajs/static)  
[koa-send](https://github.com/koajs/send)  
[koa-router](https://github.com/ZijianHe/koa-router)

### License
MIT - Owen Calvin
npm package: @lolpix/react-hashrouter
Description: A fluent hash based router for React apps
Author: Nicolai Süper
Latest version: 0.0.2

[![Build Status](https://travis-ci.org/lolPix/react-hashrouter.svg?branch=master)](https://travis-ci.org/lolPix/react-hashrouter)
[![Coverage](https://codecov.io/gh/lolPix/react-hashrouter/branch/master/graph/badge.svg)](https://codecov.io/gh/lolPix/react-hashrouter)
![Zero Dependencies](https://img.shields.io/badge/0-Zero%20Dependencies-green.svg)


# react-hashrouter
> A simple hashrouter for React with a fluent API

## Install
```
$ npm install --save @lolpix/react-hashrouter
```

## Usage example
```javascript
import React from 'react';
import Router, {Link} from 'react-hashrouter';

export const Index = ({navigateTo}) => (
  <div>
    <h1>Index page</h1>
    <Link to="/test/1">Go to test #1</Link>
    {/* Or alternatively */}
    <Button type="button" onClick={() => navigateTo('/test/2')}>Go to test #2</Button>
  </div>
);

export const Test = ({testId}) => <h1>Test #{testId}</h1>;

export const App = props => (
  <Router>{routes =>
     routes
         .add('/', Index)
         .add('/test/:testId', Test)
         .fallback(<h1>Not found!</h1>)
  }</Router>
);
```

## Future goals

- Expose a 'router' object to the routed component
    - `addRoute(path, component)` or `setRoute(path, component)` for lazy loaded routes
    - `navigateTo(path)` as implemented
- Allow lazy loading of components
    - Accept a Promise inside the routeMapper

## License
MIT © Nicolai Süper (nico@k40s.net)