open-index/open-npm huggingface dataset:
npm package: @rescale/slim
Description: `Slim` is a compression suite for javascript objects. It is designed to be used in the browser and in Node.js envs.
Author: Z4NR34L
Latest version: 1.0.1

# @rescale/slim

`Slim` is a compression suite for javascript objects. It is designed to be used in the browser and in Node.js envs.

## Installation

```bash
npm install @rescale/slim
```

```bash
pnpm add @rescale/slim
```

```bash
bun add @rescale/slim
```

## Docs

[Read the docs](https://www.rescale.build/docs/packages/slim)

## Demo

[Check it in action!](https://tools.rescale.build/experimental/compression)

## Usage

### React

```tsx
import { inflate, deflate } from '@rescale/slim';

const data = { a: 1, b: 2, c: 3 };

const compressed = deflate(data);

const decompressed = inflate(compressed);

export function App() {
  return (
    <div>
      <h1>Compressed data</h1>
      <pre>{compressed}</pre>
      <h1>Decompressed data</h1>
      <pre>{JSON.stringify(decompressed, null, 2)}</pre>
    </div>
  );
}
```

### Node.js

```ts
import { inflate, deflate } from '@rescale/slim';

const data = { a: 1, b: 2, c: 3 };

const compressed = deflate(data);

const decompressed = inflate(compressed);

console.log('Compressed data:', compressed);

console.log('Decompressed data:', decompressed);
```

### Next.js

`/app/page.tsx`

```tsx
import { inflate, deflate } from '@rescale/slim';

const data = { a: 1, b: 2, c: 3 };

const compressed = deflate(data);

const _decompressed = inflate(compressed);

export default async function Page() {
  const { decompressed } = await fetch(
    `/api/data?compressed=${compressed}`,
  ).then((res) => res.json());

  return (
    <div>
      <h1>Compressed data</h1>
      <pre>{compressed}</pre>
      <h1>compatibility</h1>
      <pre>
        {String(JSON.stringify(_decompressed) === JSON.stringify(decompressed))}
      </pre>
    </div>
  );
}
```

`/app/api/data/route.ts`

```ts
import { type NextRequest, NextResponse } from 'next/server';
import { inflate, deflate } from '@rescale/slim';

export function GET(request: NextRequest) {
  const compressed = request.nextUrl.searchParams.get('compressed');

  return NextResponse.json({
    decompressed: inflate(compressed),
  });
}
```

## Motivation

We've encountered many problems with URL link length when passing filters in params and the size of the data we send to the server. We've tried many libraries and none of them were good enough for our needs. So we decided to create our own library based on PAKO zlib port.
npm package: @rescapes/translation
Description: Translation helpers
Author: Andy Likuski andy@likuski.org
Latest version: 0.0.37

# Rescape Translate

Clone repo

````
git clone git+ssh://git@github.com/calocan/rescape-translate.git
````

Install dependencies

`npm install` or `yarn install`

## Library files

All library files are located inside `src`

## Testing

`npm run test` or `yarn run test`

## Build library

`npm run build` or `yarn run build`

Produces production version of library under the `build` folder.

## Publish library

`yarn run build-publish-patch`