open-index/open-npm huggingface dataset:
npm package: @purpose/ttl-cache
Description: Simple ttl cache
Author: Bence Dányi
Latest version: 1.0.2

# ttl-cache

> in-memory ttl cache. that's it

## install

```sh
$ npm i @purpose/ttl-cache
```

## usage

```js
import c from '@purpose/ttl-cache';

const cache = c();
cache.set('foo', 'bar');
console.log(cache.get('foo'));
```

## api

### `cache([opts])`

create cache that keep items for `opts.ttl || 300000` ms, and does cleanup
every `opts.interval || 60000` ms.

### `cache.get(key)`

get item by key, or null if expired or missing

### `cache.set(key, value)`

set item by key

### `cache.length`

get current cache size (might contain expired items too)

## license

MIT
npm package: @purposeinplay/core-mobile
Description: A design system for all PiP mobile apps
Author: Ovidiu G.
Latest version: 0.1.0

## How to install this library?

### 1. Install the dependencies

```bash
yarn add nativewind # install nativewind
yarn add --dev tailwindcss@3.2.2 # Install tailwind css v3.2.2 https://stackoverflow.com/questions/76688256/getting-error-use-processcss-thencb-to-work-with-async-plugins
yarn add @purposeinplay/core-mobile # Install the library
```

### 2. Babel config

Go to `babel.config.js` and add the following:

```diff
// babel.config.js
module.exports = function (api) {
  api.cache(true);
  return {
    presets: ["babel-preset-expo"],
+   plugins: ["nativewind/babel"],
  };
};
```

### 3. Tailwind config

Add a `tailwind.config.js` file to the root of your project and add the following:

```js
const libraryPath = require.resolve('@purposeinplay/core-mobile/package.json');

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    // App's own components
    './src/**/*.{js,jsx,ts,tsx}',
    `${libraryPath}/src/**/*.{js,jsx,ts,tsx}`,
  ],

  theme: {
    extend: {},
  },
  plugins: [],
};
```