open-index/open-npm huggingface dataset:
npm package: @gen-codes/json-transformer
Description: Extract deeply nested data into your own schema https://ast-parser.now.sh
Latest version: 1.0.11

# JSON-Transformer

Extract deeply nested data into your own schema https://ast-parser.now.sh

## How it works 

json-transformer traverses the data and scrapes data based on a json query
syntax.

It takes as an input a rules object and the nested data.
The rules object first checks if a query has a response. If it checks true than it matches the responses of the queries with the corresponding field.
The query-engine is based on the json-query npm package with some additions. 

`{query}` is replaced with the response of the corresponding query.

`(=1+2)` is replaced with the eval if the enclosed code `(=1+2)` === `3`

`!query` will return true if something is found else false 

`(query) + 'Prop'` will return the evaluation of the whole string first replacing the query in parentheses.

## Example

We want to extract propTypes data with their comments from this piece of js code:
```js
Button.propTypes = {
  // Can have a Link child or icon
  children: PropTypes.node.isRequired,
  xsFullWidth: PropTypes.bool,
  color: PropTypes.string,
  // hello
  variant: PropTypes.string,
  size: PropTypes.oneOf(["small", "medium", "large"])
  
};
```
We parse the code to AST using esprima parser and then run json-transformer 
with these rules:
```js
const rules = {
  propTypes: {
    check: "expression.left.property[name=propTypes].name",
    data: {
      name: "expression.left.object.name",
      props: [
        {
          path: "expression.right.properties[]",
          data: {
            name: "key.name",
            docstring:
              "$.comments[loc][end][line={(key.loc.start.line)-1}].parent.parent.value",
            type:
              "value.object.property.name|value.property.name|value.arguments[elements].value",
            isRequired: "!(value.property.name) === 'isRequired'"
          }
        }
      ]
    }
  }
};
```

The result will be:

```json
[
  {
    "name": [
      "Button"
    ],
    "props": [
      {
        "name": "children",
        "docstring": " Can have a Link child or icon",
        "type": "node",
        "isRequired": true
      },
      {
        "name": "xsFullWidth",
        "docstring": null,
        "type": "bool",
        "isRequired": false
      },
      {
        "name": "color",
        "docstring": null,
        "type": "string",
        "isRequired": false
      },
      {
        "name": "variant",
        "docstring": " hello",
        "type": "string",
        "isRequired": false
      },
      {
        "name": "size",
        "docstring": null,
        "type": [
          "small",
          "medium",
          "large"
        ],
        "isRequired": false
      }
    ]
  }
]
```

More examples can be found at the [ast-parser-viewer package](https://github.com/gen-codes/core/tree/master/packages/ast-parser-viewer/src/languages)
npm package: @gen/prng
Description: Pseudo random number generator
Author: Gen Ichino
Latest version: 0.0.2

# prng

[![Build Status](https://travis-ci.org/zenoplex/prng.svg?branch=master)](https://travis-ci.org/zenoplex/prng)

Simple pseudo random number generator based on [Park-Miller-Carta](http://www.firstpr.com.au/dsp/rand31/).

There are more sophisticated and battle tested prng out there so its advised to take a look at more famous generators first.

## Quick start

```
yarn add -S @gen/prng
```

```
// some file.js
const prng = require('@gen/prng').generator(1); // pass seed value
prng.random(); // random int based on seed 
```
npm package: @gen/random-text
Description: yugop style random text effect
Author: Gen Ichino
Latest version: 0.0.1

# RandomText

[![Build Status](https://travis-ci.org/zenoplex/random-text.svg?branch=master)](https://travis-ci.org/zenoplex/random-text)

Yugop.com(by Yugo Nakamura) style text animation effect re-created in javascript.
Ported from my old Actionscript 3 file.

![sample.gif](https://github.com/zenoplex/random-text/raw/master/sample.gif)

## Quick start
npm package: @gen/react-use-p5
Description: use p5 with hooks
Author: zenoplex
Latest version: 0.4.3

# react-use-p5

> use p5 with hooks

![Node.js CI](https://github.com/zenoplex/react-use-p5/workflows/Node.js%20CI/badge.svg)
[![NPM](https://img.shields.io/npm/v/@gen/react-use-p5.svg)](https://www.npmjs.com/package/@gen/react-use-p5) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)


## Install

```bash
# with npm
npm install --save @gen/react-use-p5

# with yarn
yarn add @gen/react-use-p5
```

## Usage

```tsx
import React, { Component } from 'react';
import { useP5 } from '@gen/react-use-p5';
import { sketch } from 'your-p5-sketch-file';

const Component = () => {
  const [setRef] = useP5(sketch);
  // Canvas will be rendered as child of div
  return <div ref={setRef} />
}
```

## License

MIT © [zenoplex](https://github.com/zenoplex)
npm package: @gen/rollup-plugin-generate-html
Description: Simple html generation plugin for rollup
Author: Gen Ichino
Latest version: 0.1.1

# rollup-plugin-generate-html

[![Build Status](https://travis-ci.org/zenoplex/rollup-plugin-generate-html.svg?branch=master)](https://travis-ci.org/zenoplex/rollup-plugin-generate-html)

Simple rollup plugin to generate html file.  Currently html file will be placed in same directory as the output file.
This plugin is inspired from [rollup-plugin-fill-html](https://github.com/alwaysonlinetxm/rollup-plugin-fill-html).

## Installation

```bash
npm install --save-dev @gen/rollup-plugin-generate-html
```

## Usage

```js
import html from '@gen/rollup-plugin-generate-html';

export default [{
  input: 'main.js',
  output: {
    file: 'bundle.js',
    format: 'umd'
  },
  plugins: [
    html({
      // specify template html (optional)
      template: './index.html',  // Default undefined
      // output filename (optional)
      filename: 'some.html', // Default index.html
      // when specified, js src will use absolute path from publicPath (optional)
      publicPath: 'dist' // Default undefined
    })
  ]
}];
```

### Advanced usage

For cases when you want to generate html file per output. This should come in handy when you want to generate book example codes and such.

```js
import glob from 'glob';
import html from '@gen/rollup-plugin-generate-html';

const configs = glob.sync('src/**/index.js').map(input => ({
  input,
  output: [{ file: input.replace(/^src/, 'dist'), format: 'umd' }],
  plugins: [html()],
}));

export default configs;
```
npm package: @gen6033/chrome-path
Description: Getting chrome/chromium paths
Author: gen6033
Latest version: 0.0.1

# chrome-path

> Getting chrome/chromium paths


## Install

```
$ npm install @gen6033/chrome-path
```


## Usage

```js
const chromePath = require('@gen6033/chrome-path');

chromePath()
/* =>
{ 'google-chrome': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
  'google-chrome-canary': '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary',
  chromium: '/Applications/Chromium.app/Contents/MacOS/Chromium' }
*/
```

## License

MIT
npm package: @genagain/learnstorybook-design-system
Description: Storybook design systems tutorial
Author: genagain
Latest version: 0.1.5

# Storybook design system tutorial

The Storybook design system tutorial is a subset of the full [Storybook design system](https://github.com/storybookjs/design-system/), created as a learning resource for those interested in learning how to write and publish a design system using best in practice techniques.

Learn more in [Storybook tutorials](https://storybook.js.org/tutorials/).
npm package: @genai-cms/gemini-content-generator
Description: Plugin to generate conten using Google Gemeni AI service
Author: sshinde
Latest version: 0.0.7

# gemeni-content-generator

Plugin that will add a custom `Text AI` field to Strapi Admin panel based on Google Gemeni AI service. The custom filed can use like any other field to generate content using Gen AI capabilities.

With this plugin, content authors can seamlessly generate high-quality content directly within the Strapi admin interface. By leveraging AI-powered suggestions, the plugin streamlines the content creation process, enabling users to quickly draft, edit, and enhance their entries without leaving Strapi.

## Installation

```bash
npm install @genai-cms/gemini-content-generator
```

# Configuration

## Enable Plugin
Add the plugin to your `config/plugins.js` or `config/plugins.ts`:

```js
module.exports = {
    'gemeni-content-generator': {
        enabled: true
    },
};
```

## Creating a Gemini API Key

1. Visit the [Google AI Studio](https://aistudio.google.com/app/apikey) and sign in with your Google account.
2. Click on "Create API key" and follow the prompts.
3. Copy the generated API key.
4. Add the API key to your `.env` file as shown below:
    ```
    GEMINI_API_KEY=<YOUR GEMENI API KEY>
    ```

## Usage

After the plugin installation and configuration, you can access the `Text AI` field under `CUSTOM` fields tab. You can use this field to generate content for your collection types using the Google Gemini AI service. Below screenshot shows the custom `Text AI`.

![Custom Text AI field](docs/images/3.png)

For more details, refer to the plugin documentation or the Strapi marketplace page.


## Example Strapi Project
There is an example strapi projec (`strapi-genai-plugin-example`) in the `example` folder. Follow below steps:
1. Navigate to the `example/strapi-genai-plugin-example` directory:
    ```bash
    cd example/strapi-genai-plugin-example
    ```
2. Install dependencies:
    ```bash
    npm install
    ```
3. Copy the `.env.example` file to `.env` and update the `GEMINI_API_KEY` with your Gemini API key:
    ```bash
    cp .env.example .env
    ```
4. Start the Strapi development server:
    ```bash
    npm run develop
    ```
5. Open your browser and go to [http://localhost:1337/admin](http://localhost:1337/admin) to access the Strapi admin panel and test the plugin.

6. use the sample user admin@demo.com and password: `StrapiDemo123`

## Sample Screen
### Create new collection type
![Custom Text AI field](docs/images/1.png)
![Custom Text AI field](docs/images/2.png)
### Add fields (custom and regular) to the collection
![Custom Text AI field](docs/images/3.png)
![Custom Text AI field](docs/images/4.png)
![Custom Text AI field](docs/images/5.png)
![Custom Text AI field](docs/images/6.png)
![Custom Text AI field](docs/images/7.png)

![Custom Text AI field](docs/images/8.png)
### Use the custom Text AI fields to generate content (using a prompt)
![Custom Text AI field](docs/images/9.png)
npm package: @genai-fi/base
Description: [Generation AI](https://www.generation-ai-stn.fi) base code library for all common components of our educational apps.
Latest version: 4.4.3

# Introduction

[Generation AI](https://www.generation-ai-stn.fi) base code library for all common components of our educational apps.

# Getting Started

```bash
npm install @genai-fi/base
```

See the Ladle stories in the `src` folder.

# Build and Test

Use `npm run build` to build the library in the `dist` folder. Testing uses vitest with `npm test`.
npm package: @genai-fi/classifier
Description: Used by the GenAI Teachable Machine, this package contains the core classifier application code. It allows the creation, loading and saving of GenAI TM projects, as well as the execution of the classifier using HTML Canvas elements for images.
Latest version: 1.2.1

# GenAI Classifier Package

Used by the GenAI Teachable Machine, this package contains the core classifier application code. It allows the creation, loading and saving of GenAI TM projects, as well as the execution of the classifier using HTML Canvas elements for images.

# Getting Started

```
npm install @knicos/genai-classifier
```

# Build and Test

```
npm run build
npm test
```