open-index/open-npm huggingface dataset:
npm package: @irrelon/boolean-map
Description: Maps boolean values to binary string sequences and maps those to chosen values
Author: Irrelon Software Limited
Latest version: 0.0.1

# Boolean Map
Tiny helper to map boolean values to a string.

## Example
```js
const result = booleanMap({
	"11": "1st",
	"01": "2nd",
	"10": "3rd",
	"00": "4th"
}, true, false);

console.log(result); // Outputs "3rd"
```

## Install
```bash
npm i @irrelon/booleanmap
```
npm package: @irrelon/cache-express
Description: Express Cache Middleware: Effortlessly cache responses with custom timeouts, dependencies, pooling, support for cache-control
Author: Irrelon Software Limited - Rob Evans
Latest version: 5.0.1

# Express Caching Middleware

Add cache support to your Express application. Supports in-memory and
Redis-based caching out of the box.

## Install
> This module has a peer dependency of `@irrelon/emitter` which is also
> installed by this command:

```
npm i @irrelon/cache-express @irrelon/emitter
```

## Usage
Add the `expressCache()` function before your route handler function.

### In Memory Cache
```typescript
import express from "express";
import {expressCache, MemoryCache} from "@irrelon/cache-express";

const app = express();
const inMemoryCache = new MemoryCache();

// Apply the caching middleware to a route
app.get(
	"/api/data",
	expressCache({
		cache: inMemoryCache
		/*options*/
	}),
	// Your route handler function
	(req, res, next) => {
		res.send("hello!");
	}
);
```

### Redis Cache
```typescript
import {createClient} from "redis";
import express from "express";
import {expressCache, RedisCache} from "@irrelon/cache-express";

const redisClient = createClient({url: "redis://localhost:6380"});

const app = express();
const redisCache = new RedisCache({client: redisClient});

// Apply the caching middleware to a route
app.get(
	"/api/data",
	expressCache({
		cache: redisCache
		/*options*/
	}),
	// Your route handler function
	(req, res, next) => {
		res.send("hello!");
	}
);
```

### Options

See the [ExpressCacheOptions.ts](src/types/ExpressCacheOptions.ts) type which describes the options available.

#### Example Usage

```javascript
import express from "express";
import expressCache from "cache-express";

const app = express();

// Apply caching middleware with custom options
app.get(
	"/api/data",
	expressCache({
		timeOutMins: 1, // Cache for 1 minute
	}),
	(req, res) => {
		// time consuming api or database calls
		let data = { success: true };
		res.json(data);
	}
);

// Or you can create a middleWare configuration beforehand:
let postsCache = expressCache({
	timeOutMins: 1,
});

// Then use it in route.
app.get("/api/posts", postsCache, (req, res) => {
	//...
	res.send("");
});

app.listen(3000, () => {
	console.log("Server is running on port 3000");
});
```

#### Examples

1. Basic Usage:

   ```javascript
   import express from "express";
   import expressCache from "cache-express";

   const app = express();

   app.get("/api/data", expressCache());

   app.listen(3000, () => {
   	console.log("Server is running on port 3000");
   });
   ```

2. Custom Timeout and Callback:

   ```javascript
   app.get(
   	"/api/data",
   	expressCache({
   		timeOutMins: 1, // Cache for 1 minute
   	})
   );
   ```

## License

This project is licensed under the [MIT License](LICENSE).
npm package: @irrelon/forerunnerdb-core
Description: ForerunnerDB core utilities for operating on JSON data.
Author: Rob Evans - Irrelon Software Limited
Latest version: 3.2.0

# ForerunnerDB Core
This project contains the core query/match/update functionality of
ForerunnerDB 3.x and is a standalone engine and can be used for
any purpose in any project.

>forerunnerdb-core provides the core of ForerunnerDB 3.0 which
>is a complete rewrite of ForerunnerDB in ES6 instead of ES5 and
>has simplicity, modularity and extensibility as the primary
>pillars of development.

Those familiar with ForerunnerDB will be used to a query language
similar to MongoDB. ForerunnerDB 3.0 understands MongoDB query
lanugage as a first class language instead of an add-on. This means
that queries in ForerunnerDB 3.x use MongoDB query language by
default.

Version 3.x will still support 2.x query language but going forward
you should adopt MongoDB query language where possible as we will
optimise for this first.

Right now, this project is still in development but is usable.
Because of this, there is no documentation. You can check out
the unit tests to see how to use various parts of the core
engine. JSDoc comments are also mostly missing at this point.