open-index/open-npm huggingface dataset:
npm package: @pomgui/rest
Description: Library to implement REST services in typescript using decorators
Author: Wilfredo
Latest version: 0.1.2

# Pomgui Rest Services

@pomgui/rest is a typescript library that makes it easier to create a node REST server using 
[decorators](https://www.typescriptlang.org/docs/handbook/decorators.html) to improve the 
reading and writing of REST services source code.

Another tool [@pomgui/rest-codegen](https://github.com/pomgui/rest-codegen) should be used to generate the model, parameter and services ts code.

## Installation

Use npm to install @pomgui/rest.

```bash
npm install @pomgui/rest
npm install -g @pomgui/rest-codegen
```

## Usage Example

### Given an openApi spec input

```yaml
...
/pet/findByStatus:
  get:
    tags:
    - "pet"
    summary: "Finds Pets by status"
    description: "Multiple status values can be provided with comma separated strings"
    operationId: "findPetsByStatus"
    produces:
    - "application/xml"
    - "application/json"
    parameters:
    - name: "status"
      in: "query"
    description: "Status values that need to be considered for filter"
    required: true
    type: "array"
    items:
      type: "string"
      enum:
      - "available"
      - "pending"
      - "sold"
      default: "available"
    collectionFormat: "multi"
    responses:
    200:
      description: "successful operation"
      schema:
      type: "array"
      items:
        $ref: "#/definitions/Pet"
    400:
      description: "Invalid status value"
...
```

And executing the code generator

```bash
rest-codegen --config=codegen.conf.js
```
Which generate `Pet`, `FindPetsByStatusParams`, and other code files,
including a skeleton 

With them, the following code can be created:

```typescript
/**    
 * Finds Pets by status
 * Multiple status values can be provided with comma separated strings
 */
@PiGET('/pet/findByStatus')
async findPetsByStatus(params: FindPetsByStatusParams): Promise<Pet[]> {
    if(params.status == 'sold')
        throw new PiError('Invalid status value', 400);
    let pets: Pet[] = [{id: 12, name: 'bingo', status: 'sold'}];
    return pets;
}
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @pomgui/rest-angular
Description: This library is used to provide the service PiApiCaller, which is a helper over HttpClient to make it easier the REST API calling.
Author: Wilfredo Pomier
Latest version: 0.1.0-beta.0

# PiRestAngular

This library is used to provide the service PiApiCaller, which is a helper over HttpClient to make it easier the REST API calling.

- It is the counterpart of the [pirest](https://github.com/pomgui/pirest) library used in server applications.
- The [picodegen](https://github.com/pomgui/pirest-codegen) tool generates code that uses the PiApiCaller to make the calls, validate, and interpret the results.

## Build

Run `ng build pirest-angular` to build the project. The build artifacts will be stored in the `dist/` directory.

## Running unit tests

Run `npm test` to execute the unit tests via [Karma](https://karma-runner.github.io). The unit tests will be executed extracting the code coverage report (into the /coverage directory).
npm package: @pomkaize/css-byebye
Description: Remove the CSS rules that you don't want, with a list of selectors
Author: Kevin Purnelle
Latest version: 3.0.1

CSS Byebye
===========

CSS Byebye is a node module that lets you explicitly remove the CSS rules that you don't want.

---------

[![Join the chat at https://gitter.im/AoDev/css-byebye](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AoDev/css-byebye?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
[![Build Status](https://travis-ci.org/AoDev/css-byebye.svg)](https://travis-ci.org/AoDev/css-byebye)

Description
------------

It's very simple: pass a list of selectors that you want to exclude and it will remove them and the associated rules from your CSS.

I've found some cases where this approach is easier than using more powerful tools like uncss.
Use what's best for you and give some feedback :)

CSS Byebye is built with [postcss](https://github.com/postcss/postcss).


Usage
------

CSS Byebye is a CSS post processor and a `postcss` plugin;
read the [postcss docs](https://github.com/postcss/postcss/blob/master/docs/api.md) for more details.

**Run it as indicated in postcss docs:**

```js
postcss(cssbyebye(options)).process(css)
```

* css is your stylesheet
* options is an object that has at least the `rulesToRemove` property defined.


### options

`rulesToRemove` is an array of `strings` or `regular expressions` (selectors).

If you provide a string, it will remove the rule(s) for this exact selector.


### Examples ###

Some CSS:

```css
 a { font-size: 12px; }
 .hello .h1 { background: red }
 .world { color: blue }
```

Using the plugin:

```js
var postcss = require('postcss')
var cssbyebye = require('css-byebye')

var rulesToRemove = ['.hello .h1', '.world']
var options = { rulesToRemove: rulesToRemove, map: false }

// pretend that css var contains the css above
var result = postcss(cssbyebye(options)).process(css)
```

`result` will be an object like this:

```js
{
  css: 'a { font-size: 12px; }'
}
```

If you use the postcss `map` option, then source map will be added to the result object.


#### You can mix strings and regular expressions

```js
var rulesToRemove = [
  '.hello',
  /.*\.world.*/
]
```

In this case, it would:
* remove a rule with the exact selector `.hello`
* remove any rule that contains the `.world` class.
npm package: @pomle/audio-ident
Description: Ultrafast zero-dependency JavaScript library for identifying WAVE and FLAC files in the browser.
Latest version: 1.0.6

# audio-ident

Ultrafast zero-dependency JavaScript library for identifying WAVE and FLAC files in the browser.

Useful when you expect a user to upload big WAVE or FLAC files and want to ensure they comply with a 
specific format before the user have started sending data to your server.

## Usage

1. Install

```
npm install @pomle/audio-ident
```

2. Import

```js
import { identifyFile } from "@pomle/audio-ident";
```

3. Call `identifyFile` with a [File object](https://developer.mozilla.org/en-US/docs/Web/API/File) from a DragEvent for example.

```js
const handleDrop = async event => {
  event.preventDefault();
  const files = event.dataTransfer.files;
  for (const file of files) {
    const fileInfo = await identifyFile(file);
    console.log(fileInfo);
  }
}
```

`fileInfo` will contain an object like the following.
```js
{
  type: "WAVE", 
  format: 1, /* A WAVE file may use compression. Format contains 1 if PCM (Uncompressed). */
  sampleRate: 44100, 
  channels: 2, 
  bitDepth: 16
}
```

## Examples

[Vanilla JS](https://codesandbox.io/s/quizzical-babbage-lebsw?fontsize=14&hidenavigation=1&theme=dark)
npm package: @pomle/classnames
Description: Helper function to apply classes to React nodes
Author: Pontus Alexander
Latest version: 0.0.0-0

# React ClassNames

Helper function to create strings for `class` attribute in HTML.

## Usage

`classNames` is a function that take any number of arguments and created a space separated string.
Arguments can be given in any order, and have the following behavior.

- `string`: appended as a normal string.

- `Record<string, boolean>`: string keys will be appended if their value is true.

- `string[]`: all strings will be appended.

### Import

```ts
import { classNames } from "@pomle/class-names";
```

### Patterns and Examples

```tsx
return items.map((item, index) => {
  return (
    <div
      className={classNames(
        "item",
        index === selectedIndex ? "active" : "inactive",
      )}
    >
      {item}
    </div>
  );
});
```

```tsx
return items.map((item, index) => {
  return (
    <div
      className={classNames("item", {
        current: selectedIndex === Index,
        prev: index > selectedIndex,
        next: index < selectedIndex,
      })}
    />
  );
});
```

```tsx
<div
  className={classNames("result", match ? "exact" : "estimate", {
    error: !!error,
    success: !!result,
  })}
/>
```
npm package: @pomle/grid
Description: TypeScript Grid class for grids of any size and dimension.
Author: Pontus Alexander
Latest version: 0.0.1-2

# Grid

A JavaScript and TypeScript lib for working with grids of any size and any dimension.

## Usage

### Write a number to each cell in a 2x2 grid

```ts
import { Grid } from '@pomle/grid';

const grid = new Grid<number, 'x' | 'y'>({ x: 2, y: 2 });

let count = 0;
for (const coord of grid) {
  count += 1;
  grid.set(coord, count);
}
```

### Dimensions can use any name

```ts
import { Grid } from '@pomle/grid';

const grid = new Grid({ width: 320, height: 240 });
```

### Dimensions can use number of dimensions

```ts
import { Grid } from '@pomle/grid';

const grid = new Grid({ a: 10, b: 10, c: 10, d: 10 });
grid.set({ a: 1, b: 1, c: 1, d: 1 }, 'one');
grid.set({ a: 2, b: 2, c: 2, d: 2 }, 'two');
```

### Neighbours can be explored

```ts
import { Grid } from '@pomle/grid';

const grid = new Grid({ x: 3, y: 3 });
for (const coord of grid.neighbours({ x: 1, y: 1 })) {
  console.log(coord); // Prints cartesian product of {x: 0, y: 0} to {x: 2, y: 2}
}
```
npm package: @pomle/react-viewstack
Description: Component for stacking views
Author: pomle
Latest version: 1.1.3

# React ViewStack

Library for facilitating view transitions.

## Usage

### ViewStack

Mounts components on top of each other in Z-order. Later elements on top. Children will be given 100% height and absolute positioning to allow you to customize transitioning.

```tsx
import { ViewStack } from "@pomle/react-viewstack";

enum View {
  Home,
  Settings,
}

function Component() {
  const [view, setView] = useState(View.Home);


  return (
    <ViewStack>
      <div className="layer-1">
        This is your homepage
        
        <button onClick={() => setView(View.Settings)}>To Settings</button>
      </div>
      
      <div className="layer-2" style={{
        transform: view === View.Settings ? "none" : "translateX(-100%)",
      }}>
        This is your settings page
        
        <button onClick={() => setView(View.Home)}>Go Back</button>
      </div>
    </ViewStack>
  );
}
```
npm package: @pomle/tween
Description: TypeScript library for creating flexible spring physics tweens
Author: Pontus Alexander
Latest version: 0.1.2-0

# Tween

TypeScript lib for animating using spring physics tweens to any dimension.

## Usage

1. Initialize
    ```ts
    import { spring } from "@pomle/tween";
    
    const tween = spring({valueA: 0, valueB: 2});
    tween.to({valueA: 3, valueB: 4});
    ```

2. Update & Read
    ```ts
    // Returns true when change made
    if (tween.update(1/60)) {
      const values = tween.values;
      console.log("New values", values);
    }
    ```

### Mutation

Input object will be mutated on update. Depending on your use case you may either supply the reference you need updated, or supply a copy.

Setup
```ts
import { spring } from "@pomle/tween";

const myObject = {
  position: {x: 0, y: 0: z: 0},
};
```

* With mutation
  
  ```ts
  const tween = spring(myObject.position);
  tween.to({x: 1, y: 2: z: 3});
  tween.update(1/60);
  ```

* With copy

  ```ts
  const tween = spring({...myObject.position});
  tween.to({x: 1, y: 2: z: 3});
  tween.update(1/60);
  Object.assign(myObject.position, tween.values);
  ```

## API

### `Vector`

Value container for all springs. Can have any number of dimensions.
```ts
type Vector = Record<string, number>;
```

### Config

Three factors, *stiffness*, *mass*, and *friction*, control the behavior of a spring physics simulation.

The fourth config option, *precision*, determines how low velocity must be before the spring is considered settled. Once the spring is settled, it will set the spring value to the desired and pause simulation until a new desired value is supplied to the `.to` function.
```ts
const config = {
  stiffness: 25, // How strong is the spring
  mass: 10, // How heavy is the object
  friction: 5, // How thick is the medium the object travels in
  precision: 0.0005, // A threshold below which the spring settles and stops updating
};

const tween = spring({value: 0}, config);
```

Config is unit-less but values are related to time step used in update function.

For example, if your time step is in milliseconds instead of seconds, the config input must be set to numbers of a matching inverse magnitude.

To avoid the spring physics from going havoc, values must be low enough to achieve a negative feedback loop.


### Spring Interface 

#### `values: Vector`

Current state of simulation.

#### `to(value: Vector): void`

Set the desired state to which the spring will pull values.

#### `set(value: Vector): void`

Sets the value immediately and thus stops further updates.

#### `update(deltaTime: number): void`

Runs one cycle of the spring simulation moving the values toward their desired state. Fractions 1/10-1/120 is a reasonable range given the default spring config.

#### `clear(): void`

Stops updates immediately and put the values at rest

#### `reconfigure(config: Config): void`

Updates the spring physics config.
npm package: @pommejs/server
Description: PommeJS Server is a router builder for ExpressJS, ref: https://github.com/evertonbzr/pomme-ts
Author: Everton Fernandes
Latest version: 1.0.2

# PommeTS - Router Builder for APIs with Express.js

PommeTS is a JavaScript library that provides a simple and efficient way to create routes for APIs in Express.js applications.

## Installation

To start using PommeTS in your project, you can install it using npm or yarn:

```bash
npm install pomme-ts
# or
yarn add pomme-ts
```

## How to Use

Here's a basic example of how to create a route using PommeTS:

```javascript
import express from 'express';
import { p } from 'pomme-ts';
import { generateRoutesOutputPlugin } from './plugins/generateRoutesOutput';

import { z } from 'zod';
const app = express();
app.use(express.json());

const v1CreateTodo = p.route.post({
  key: 'v1CreateTodo',
  bodySchema: z.object({
    title: z.string(),
  }),
  async resolver(input, ctx) {
    const { title } = input.body;
    return [
      {
        id: '1',
        title: 'Todo 1',
      },
    ];
  },
});

const v1GetTodo = p.route.get({
  key: 'v1GetTodo',
  path: '/:id',
  querySchema: z.object({
    title: z.string().optional(),
  }),
  async resolver(input, ctx) {
    const { title } = input.body;
    return [
      {
        id: '1',
        title: 'Todo 1',
      },
    ];
  },
});

const todoController = p
  .controller()
  .withPath('/todo')
  .withRoutes([v1GetTodo, v1CreateTodo])
  .build();

const server = p
  .server()
  .withApp(app)
  .withPlugins([
    generateRoutesOutputPlugin({
      homeWithLastChecksum: true,
      limit: 5,
    }),
  ])
  .withControllers([todoController])
  .build();

app.listen(3000, () => {
  console.log('Server started on port 3000');
});
```

## Features

PommeTS offers the following features:

- Creation of simple and expressive routes for APIs based on HTTP operations (GET, POST, PUT, DELETE, etc.).
- Support for handling route parameters, query strings, and middlewares.
- Organized structure to facilitate code maintenance and expansion.
- Possibility to group routes by controllers.

## Contributing

If you'd like to contribute to the project, feel free to open a pull request. Please feel free to report issues or request new features through Issues.

## License

PommeTS is licensed under the [MIT License](https://opensource.org/licenses/MIT).

---

We hope that PommeTS makes building APIs in your Express.js applications easier. If you have any questions or need assistance, don't hesitate to get in touch with us. We appreciate your interest in using PommeTS!
npm package: @pompadour/react-native-skia
Description: High-performance React Native Graphics using Skia
Author: Pompadour Inc.
Latest version: 1.5.39

# React Native Skia

High-performance 2d Graphics for React Native using Skia

<img width="400" alt="skia" src="https://user-images.githubusercontent.com/306134/146549218-b7959ad9-0107-4c1c-b439-b96c780f5230.png">

Checkout the full documentation [here](https://shopify.github.io/react-native-skia).

Documentation on the library development is available [here](https://github.com/Shopify/react-native-skia#library-development).