open-index/open-npm huggingface dataset:
npm package: @flash-swap/sdk
Description: 🛠 An SDK for building applications on top of Flash Swap.
Latest version: 1.0.7-test

# Pancakeswap SDK

Forked from the [Uniswap SDK](https://github.com/Uniswap/uniswap-v2-sdk/commit/a88048e9c4198a5bdaea00883ca00c8c8e582605).

You can refer to the Uniswap SDK documentation [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/pancakeswap/pancake-swap-sdk.git
```

Move into the pancakeswap-sdk working directory

```sh
cd pancakeswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @flash-swap/uikit
Description: Set of UI components for ducky projects
Latest version: 1.0.35

# 🥞 Pancake UIkit

**This repository is not used anymore. See the [https://github.com/pancakeswap/pancake-toolkit](Pancake toolkit) instead**

[![Version](https://img.shields.io/npm/v/@pancakeswap-libs/uikit)](https://www.npmjs.com/package/@pancakeswap-libs/uikit) [![Size](https://img.shields.io/bundlephobia/min/@pancakeswap-libs/uikit)](https://www.npmjs.com/package/@pancakeswap-libs/uikit)

Pancake UIkit is a set of React components and hooks used to build pages on Pancake's apps. It also contains a theme file for dark and light mode.

## Install

`yarn add @pancakeswap-libs/uikit`

## Setup

### Theme

Before using Pancake UIkit, you need to provide the theme file to styled-component.

```
import { ThemeProvider } from 'styled-components'
import { light, dark } from '@pancakeswap-libs/uikit'
...
<ThemeProvider theme={isDark}>...</ThemeProvider>
```

### Reset

A reset CSS is available as a global styled component.

```
import { ResetCSS } from '@pancakeswap-libs/uikit'
...
<ResetCSS />
```

### Types

This project is built with Typescript and export all the relevant types.

## How to use the UIkit

If you want to use components from the UIkit, check the [Storybook documentation](https://pancakeswap.github.io/pancake-uikit/)
npm package: @flash0p/flashcache
Description: A simple in-memory cache implementation with TTL support.
Author: Your Name
Latest version: 1.0.2

# flashcache

A lightweight in-memory caching solution for JavaScript applications with TTL support.

## Installation

```bash
npm i @flash0p/flashcache
```

## Features

- 🚀 Simple and lightweight
- ⏰ Time-To-Live (TTL) support
- 🧹 Automatic cleanup of expired items
- 🔍 Type-safe get/set operations

## Basic Usage

```javascript
import createCache from "@flash0p/flashcache";

// Create a new cache instance
const cache = createCache();

// Basic operations
cache.set("user", { id: 1, name: "John" });
const user = cache.get("user"); // { id: 1, name: "John" }

// With TTL (Time-To-Live)
cache.set("temporaryData", "This will expire", 5000); // Expires in 5 seconds

// Check existence
if (cache.has("user")) {
  console.log("User exists in cache");
}

// Delete specific item
cache.delete("user");

// Clear entire cache
cache.clear();

// Get cache size
const size = cache.size(); // Returns number of items in cache
```

## Advanced Usage Examples

### Caching API Responses

```javascript
const apiCache = createCache();

async function fetchUserWithCache(userId) {
  if (apiCache.has(userId)) {
    return apiCache.get(userId);
  }

  const response = await fetch(`/api/users/${userId}`);
  const userData = await response.json();

  // Cache for 5 minutes
  apiCache.set(userId, userData, 5 * 60 * 1000);

  return userData;
}
```

### Using as a Rate Limiter

```javascript
const rateLimitCache = createCache();

function checkRateLimit(ip, limit = 100) {
  const current = rateLimitCache.get(ip) || 0;

  if (current >= limit) {
    return false;
  }

  rateLimitCache.set(ip, current + 1, 60 * 1000); // Reset after 1 minute
  return true;
}
```

### Caching Computed Values

```javascript
const computeCache = createCache();

function expensiveComputation(input) {
  const cacheKey = `compute_${input}`;

  if (computeCache.has(cacheKey)) {
    return computeCache.get(cacheKey);
  }

  // Simulate expensive computation
  const result = Array(input)
    .fill(0)
    .reduce((acc) => acc + Math.random(), 0);

  computeCache.set(cacheKey, result, 30 * 1000); // Cache for 30 seconds
  return result;
}
```

## API Reference

### `createCache()`

Creates a new cache instance.

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

Sets a value in the cache. Optional TTL in milliseconds.

### `cache.get(key)`

Retrieves a value from the cache. Returns undefined if not found or expired.

### `cache.has(key)`

Checks if a key exists and is not expired.

### `cache.delete(key)`

Removes a specific key from the cache.

### `cache.clear()`

Removes all items from the cache.

### `cache.size()`

Returns the number of items currently in the cache.

## Testing

```bash
npm test
```

## License

MIT License