open-index/open-npm huggingface dataset:
npm package: @polmeric/kale
Description: Simple Non Obtrusive CQRS and ES in Node/Typescript
Author: Alexander Wanyoike
Latest version: 0.1.8

# Kale

Simple CQRS and Event Sourcing without requiring a specific framework. This is based on nestjs cqrs modules found [here](https://github.com/nestjs/cqrs)
but without the dependency on nestjs. Dependency injection has also been abstracted so that any DI system can be used.
See tests for more information. 

Disclaimer: This project is fairly new and is **NOT RECOMMENDED FOR PRODUCTION** if you would like a production solution 
please look into frameworks that provide the overall solution such use wolkenkit or 

## Summary

  - [Getting Started](#getting-started)
  - [Authors](#authors)
  
## Getting Started

### Installing

To install:

```
yarn add @awanyoike/kale
```

## Running the tests

In order to run the tests simply run

```
jest
```

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions
available, see the [tags on this
repository](https://github.com/alexanderwanyoike/kale/tags).

## Authors

  - **Alexander Wanyoike** - *INITIAL WORK* - [Alexander Wanyoike](https://github.com/alexanderwanyoike)
npm package: @pologora/data-transformer
Description: Advanced data transformation functions
Author: Oleksandr Wojtyla
Latest version: 1.1.1

# @pologora/data-transformer

A lightweight npm package for data transformation utilities.

## Instalation

npm:

```javascript
npm install @pologora/data-transformer
```

## Usage

```javascript
const {
  invertBoolean,
  addValues,
  stringifyValue,
  coerceToType,
  convertToNumber,
  convertToBoolean,
  convertToBigInt,
  convertToObject,
  convertArrayToObject,
} = require('@pologora/data-transformer');
```

## Functions

- **invertBoolean**: Inverts a boolean value.
- **addValues**: Adds two values together.
- **stringifyValue**: Converts a value to its string representation.
- **coerceToType**: Coerces a value to a specified data type.
- **convertToNumber**: Converts a value to a number.
- **convertToBoolean**: Converts a value to a boolean.
- **convertToBigInt**: Converts a value to a BigInt.
- **convertToObject**: Converts a value to a Object.
- **convertArrayToObject**: Converts an array to a Object.

## Handling Null and Undefined Values

For most functions, passing `null` or `undefined` as input will result in an
error being thrown, except for the following cases:

- **coerceToType**: Passing `null` or `undefined` will throw an error for most
  data types, except when coercing to boolean using
  `coerceToType(value, 'boolean')`.
- **convertToBoolean**: Returns `false` when passed `null` or `undefined`.

## Contributing

Contributions are welcome! If you have any suggestions, bug reports, or feature
requests, please
[open an issue](https://github.com/pologora/data-transformer-lib/issues).

## License

This package is licensed under the MIT License.
npm package: @polojs/polo-plugin-tailwind
Description: Super basic tailwind setup.
Latest version: 0.1.0

# Polo-plugin-tailwind

Super basic tailwind setup.

Usage:

```sh
yarn add @polojs/polo-plugin-tailwind
```

Running or building the server will automatically create the necessary config files if they don't already exist.

To use tailwind import the tailwind css file somewhere in your page or layouts.

```js
import '@polojs/polo-plugin-tailwind/tailwind.css';
```

If you want to do something custom feel free to import tailwind yourself:

```css
@tailwind base;
@tailwind components;
@tailwind utilities;
```
npm package: @polojs/query
Description: @tanstack/query port for Marko
Latest version: 0.2.0

## Query

A query client using `@tanstack/react-query` (formally `react-query@4.0.0-beta.23`).

## Instructions

In a nutshell you use the component like this:

```marko
import { getTodos, postTodo } from './_api'

<query-client-config>
  <query-client/queryClient />
  <query/query=getTodos keys=['todos']  />
  <mutation/mutation=postTodo onSuccess(){queryClient().invalidateQueries(['todos'])}/>

  <div>
    <ul>
      <if=query.data>
        <for|todo| of=query.data by=(todo => todo.id)>
          <li>${todo.title}</li>
        </for>
      </if>
    </ul>

    <button
      onClick=() => {
        mutation.mutate({
          id: Date.now(),
          title: 'Do Laundry',
        })
      }
    >
      Add Todo
    </button>
  </div>
</query-client-config>
```

This pretty much encapsulates the functionality of the component.

### query tag

The `<query>` tag accepts a default argument of a query function and returns information about the current state of the query.
This can return any object however you may 

### mutate tag

The `<mutate>` tag allows you to perform mutations.
Mutations may return data and that data can be used to update the UI.
Or alternatively you can call `queryClient.invalidateQuery` to trigger certain queries to refresh.

### query client config

The `<query-client-config>` tag allows you to configure a query client and pass data into it.

### query client

The `<query-client>` returns a function that returns an instance of QueryClient. This is useful for performing actions such as invalidating queries.

## TODO

- External query cache sync
- Marko 5 support?
- The rest of the react-query api (ie InfiniteQuery, isFetching, isMutating, isRestoring, etc)
npm package: @polojs/swagger-inline-plugin
Description: EXPERIMENTAL
Latest version: 0.1.0

# Swagger-Inline-Plugin

EXPERIMENTAL

This plugin uses [swagger-inline](https://www.npmjs.com/package/swagger-inline) to parse your source code looking for inline OAS schema definitions.
This is then compiled into a single JSON that you can import into your project and use at runtime to, for example, automatically generate an SDK.

This plugin works with Vite and maybe webpack in the future.

## Setup

### Vite

In your vite config
```js
import swaggerInlinePlugin from '@polojs/swagger-inline-plugin';

export default defineConfig({
  plugins: [swaggerInlinePlugin()]
});
```

### Polojs/Svelte

If you are using PoloJS or Svelte add the plugins under the `viteConfig.plugins[]` section of the `polo.config.json` or `svelte.config.json` respectively.

### Webpack

COMING SOON

## Usage

Create a base file, usually called `swaggerBase.json` or `swaggerBase.yaml`.

Example:

```yml
swagger: "3.1"
host: "petstore.swagger.io"
basePath: "/api"
schemes: ['http']
```

In your code add some jsdoc comments 

```js
/**
 * @api [get] /pets
 * bodyContentType: "application/json"
 * description: "Returns all pets from the system that the user has access to"
 * responses:
 *   "200":
 *     description: "A list of pets."
 *     schema:
 *       type: "String"
 */

/**
 * @schema Pet
 * required:
 *   - id
 *   - name
 * properties:
 *   id:
 *     type: integer
 *     format: int64
 *   name:
 *     type: string
 *   tag:
 *     type: string
 */
```

Now simply import the `@api` file like any regular package.

```js
import apiSpec from '@api';

console.log(apiSpec);
```