open-index/open-npm huggingface dataset:
npm package: @pin-code/ui-kit
Description: UI Kit команды ПИН-КОД
Author: CatDeveloper
Latest version: 0.0.16

# Pincode UI Kit

UI Kit студенческой команды ПИН-КОД, основанный на [shadcn/ui](https://ui.shadcn.com/).

## 📦 Установка

```bash
npm install @pin-code/uikit.lib
# или
yarn add @pin-code/uikit.lib
```

## 📚 Документация и Storybook

### Локальный запуск Storybook

```bash
git clone https://github.com/pin-code-dev/pincode.uikit.lib
cd pincode.uikit.lib
yarn install
yarn storybook
```

### Онлайн документация

🔗 [Storybook документация](https://pincode-ui.netlify.app/) - интерактивные примеры всех компонентов

npm publish --access public
npm package: @pin-dao/common-components-v2
Description: Common utility classes, methods, components, etc.
Author: song shuangshuang
Latest version: 1.0.0

# common-components-v2

common components|utils|class build project. (based on vue2+elementUI2+vxeTable3)

## develop

``` javascript
npm install --registry=https://registry.npmmirror.com
```

### local

``` javascript
npm run dev
```

### build

``` javascript
npm run lib
```

### Lints and fixes files

``` javascript
npm run lint
```

## use

``` javascript
npm i common-utils-comps --save
```

### use in main.js

``` javascript
import CommonComponents from 'common-utils-comps'

CommonComponents.initGlobal('name'); // Register a global object name (attached to the window object) that contains all public methods. Please define the name yourself and make sure it does not conflict with other global variables.
Vue.use(CommonComponents); // Globally inject 
```

### page use

``` javascript
// components
<template>
  <BackToTop></BackToTop>
</template>
// methods
name.isArray(); // name Definition of the parameters corresponding to the initGlobal function in main.js
// class
import { Audiojs } from 'common-utils-comps';
const audio = new Audiojs();

audio.play('url');
```
npm package: @pin-duo-duo/core
Description: 拼多多开放平台链接地址：[https://open.pinduoduo.com/#/apidocument](https://open.pinduoduo.com/#/apidocument)
Author: lywzx
Latest version: 1.0.1-alpha.2

# 拼多多开放平台 Node 版 SDK

拼多多开放平台链接地址：[https://open.pinduoduo.com/#/apidocument](https://open.pinduoduo.com/#/apidocument)

`@pin-duo-duo/core`职在辅助快速开发，除了方便使用，sdk 还提供了的拼多多开放平台的类型声名，独立包`@pin-duo-duo/pdd-origin-api`。如果你在使用中发布类型声明文件与官方文档不一致，可以安装`@pin-duo-duo/scripts`包，重新生成声明文件。

[![Build Status](https://img.shields.io/travis/lywzx/pdd-node-sdk/master.svg)](https://travis-ci.org/lywzx/pdd-node-sdk)
[![codecov](https://codecov.io/gh/lywzx/pdd-node-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/lywzx/pdd-node-sdk)
[![NPM version](https://img.shields.io/npm/v/pdd-node-sdk.svg?style=flat-square)](https://www.npmjs.com/package/pdd-node-sdk)
[![NPM downloads](https://img.shields.io/npm/dm/@pin-duo-duo/core.svg?style=flat-square)](https://www.npmjs.com/package/@pin-duo-duo/core)
[![Known Vulnerabilities](https://snyk.io/test/github/lywzx/pdd-node-sdk/badge.svg?targetFile=package.json)](https://snyk.io/test/github/lywzx/pdd-node-sdk?targetFile=package.json)
[![License](https://img.shields.io/npm/l/pdd-node-sdk.svg?sanitize=true)](https://www.npmjs.com/package/pdd-node-sdk)
[![Dependency Status](https://david-dm.org/lywzx/pdd-node-sdk.svg)](https://david-dm.org/lywzx/pdd-node-sdk)
[![devDependencies Status](https://david-dm.org/lywzx/pdd-node-sdk/dev-status.svg)](https://david-dm.org/lywzx/pdd-node-sdk?type=dev)

# 安装及使用

```sh
# install
npm install @pin-duo-duo/core --save # or：yarn add @pin-duo-duo/core
```

在代码中，导入`PddClient`实例始可使用：

```typescript
import { PddClient } from '@pin-duo-duo/core';

// 根据开放平台信息，填写以下内容
const client = new PddClient({
  clientId: 'clientId',
  clientSecret: 'clientSecret',
});
```

## 调用`获取商品类目属性`示例

```typescript
import {
  // ...
  PDD_GOODS_CAT_TEMPLATE_GET,
} from '@pin-duo-duo/core';

async function getGoodsTemplate(catId, assessToken) {
  const detail = await client.execute(PDD_GOODS_CAT_TEMPLATE_GET, {
    access_token: '',
    cat_id: '',
  });

  // ...
  return detail;
}
```

# 关于打印日志

`@pin-duo-duo/core`是依赖于[debug](https://github.com/visionmedia/debug)包打印日志，所以你可以在启动时，在环境变量中添加：

```bash
set DEBUG=pdd:log && ...
```

具体关于`debug`的使用，可以参见`debug`文档。

# 待完善：

- 添加完善的单元测试
- 添加 API 调用文件锁
npm package: @pin-duo-duo/nestjs
Description: > TODO: description
Author: lywzx
Latest version: 1.0.1-alpha.2

# `@pin-duo-duo/nestjs`

> 在NestJs中，也可以很容易接入`@pin-duo-duo/core`的接口

## 安装

```bash
npm install @pin-duo-duo/core @pin-duo-duo/nestjs --save # or：yarn add @pin-duo-duo/core @pin-duo-duo/nestjs
```

## 使用
npm package: @pin-duo-duo/pdd-origin-api
Description: > TODO: description
Author: lywzx
Latest version: 1.0.1-alpha.2

# `@pin-duo-duo/pdd-origin-api`

> 这个包中的内容，是根据拼多多开放平台只提供的文档自动生成得来的。如果文档存在变量，重新执行`npm run generate-code`重新生成包内容。欢迎大家提`merge request`.

## 使用方法

### 安装

```bash
npm install @pin-duo-duo/pdd-origin-api --save # or：yarn add @pin-duo-duo/pdd-origin-api
```


### API名称常量

通常拼多多接口的名称为：pdd.delete.goods.commit，代码中直接可以能过导入常量使用：PDD_DELETE_GOODS_COMMIT.

```typescript
import { PDD_DELETE_GOODS_COMMIT } from '@pin-duo-duo/pdd-origin-api';
```

### 常用的类型

* `PddCommonRequestInterface`: 拼多多通用请求的参数
* `PddCollectRootResponseInterface`：响应的数据结构
* `PddCollectShortResponseInterface`: 响应数据数据结构，包含了请求的`key`与响应数据的类型映射，方便在`typescript`中使用类型推断
* `PddResponseTypeAndRequestTypeMapping`: 拼多多响应数据，通过包含无用的多级结构，这个是请求name与响应数据key之间的映射。

### 较有用常量

* `PddNeedAccessTokenTypeCollections`: 是一个数组，包含了哪些接口需要授权。

### 获取某个接口的限频率信息

* `PddApiLimiterMapping`: 一个数据，包含了对应`api`的限流信息，如下：

```typescript
export const PddApiLimiterMapping = {
    [PDD_GOODS_ADD_LIMITERS]: [
    // 商家限流信息
     {
       limiterLevel: 1,
       timeRange: 1,
       times: 20,
     },
    // 接口总限流频次
     {
       limiterLevel: 3,
       timeRange: 5,
       times: 4000,
     },
    // 应用限流频次
     {
       limiterLevel: 4,
       timeRange: 10,
       times: 2000,
     },
   ]
}
```
npm package: @pin-duo-duo/redis-throttle-adapter
Description: > TODO: description
Author: lywzx
Latest version: 1.0.1-alpha.2

# `@pin-duo-duo/redis-throttle-adapter`

> 基于Redis实现的限频器

## 使用方法

```typescript
import { RedisThrottleAdapter } from '@pin-duo-duo/redis-throttle-adapter';

const adapter = new RedisThrottleAdapter(redisClient);
```
npm package: @pin-duo-duo/scripts
Description: > TODO: description
Author: lywzx
Latest version: 0.0.2-alpha.7

# `@pin-duo-duo/scripts`

> 这是一个自动提取拼多多开放平台的接口信息，生成包`@pin-duo-duo/pdd-origin-api`中的代码。

## Usage

```base
npm install @pin-duo-duo/scripts --save # or：yarn add @pin-duo-duo/scripts
```

## 生成`@pin-duo-duo/pdd-origin-api`包内容

```bash
npm run generate-code
```
npm package: @pin-pon/cityway
Description: ||| |---|---| |Documentation | https://pole-emploi.io/data/api/offres-emploi?tabgroup-api=presentation&doc-section=api-doc-section-caracteristiques| | Reference|https://www.jsdocs.io/package/@pin-pon/pole-emploi#OffreRestService|
Author: Nicolas Perraut
Latest version: 1.0.4

# Pole emploi Javascript SDK
|||
|---|---|
|Documentation | https://pole-emploi.io/data/api/offres-emploi?tabgroup-api=presentation&doc-section=api-doc-section-caracteristiques|
| Reference|https://www.jsdocs.io/package/@pin-pon/pole-emploi#OffreRestService|

### Example

```javascript
const offers = (
  await new PoleEmploiClient({
    TOKEN: this.apiToken,
  }).offreRest.recupererListeOffre({
    commune: '38034',
    distance: 5,
  })
)?.resultats
```
npm package: @pin-pon/nuxt-graphql-playground
Description: > A Nuxt.js module that injects a server route to serve [the GraphQL Playground](https://github.com/graphql/graphql-playground)
Latest version: 1.2.1

# @pin-pon/nuxt-graphql-playground

> A Nuxt.js module that injects a server route to serve [the GraphQL Playground](https://github.com/graphql/graphql-playground)

## Setup

1. Add `@pin-pon/nuxt-graphql-playground` dependency to your project

```bash
yarn add @pin-pon/nuxt-graphql-playground # or npm install @pin-pon/nuxt-graphql-playground
```

2. Add `@pin-pon/nuxt-graphql-playground` to the `modules` section of `nuxt.config.js`

```js
export default {
  modules: [
    // Simple usage
    '@pin-pon/nuxt-graphql-playground',

    // With options
    ['@pin-pon/nuxt-graphql-playground', { /* module options */ }]
  ]
}
```

### Using top level options

```js
export default {
  modules: [
    '@pin-pon/nuxt-graphql-playground'
  ],
  gqlPlayground: {
    /* module options */
  }
}
```

## Options

### endpoint
The GraphQL server endpoint (can be absolute)
- Type: `String`
- Default: `/api/graphql`

### route
The path where the playground should be server
- Type: `String`
- Default: `/api/playground`

## License

[MIT License](./LICENSE)

Copyright (c) - Pin Pon SAS
npm package: @pin-pon/pole-emploi
Description: ||| |---|---| |Documentation | https://pole-emploi.io/data/api/offres-emploi?tabgroup-api=presentation&doc-section=api-doc-section-caracteristiques| | Reference|https://www.jsdocs.io/package/@pin-pon/pole-emploi#OffreRestService|
Author: Nicolas Perraut
Latest version: 1.0.2

# Pole emploi Javascript SDK
|||
|---|---|
|Documentation | https://pole-emploi.io/data/api/offres-emploi?tabgroup-api=presentation&doc-section=api-doc-section-caracteristiques|
| Reference|https://www.jsdocs.io/package/@pin-pon/pole-emploi#OffreRestService|

### Example

```javascript
const offers = (
  await new PoleEmploiClient({
    TOKEN: this.apiToken,
  }).offreRest.recupererListeOffre({
    commune: '38034',
    distance: 5,
  })
)?.resultats
```
npm package: @pin-pon/prisma-linter
Description: Linter to ensure prisma schema is well-formatted and all migrations are generated
Author: Nicolas Perraut
Latest version: 1.0.0

# training/prisma_linter



## Getting Started

Download links:

SSH clone URL: ssh://git@git.jetbrains.space/pin-pon/training/prisma_linter.git

HTTPS clone URL: https://git.jetbrains.space/pin-pon/training/prisma_linter.git



These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

## Prerequisites

What things you need to install the software and how to install them.

```
Examples
```

## Deployment

Add additional notes about how to deploy this on a production system.

## Resources

Add links to external resources for this project, such as CI server, bug tracker, etc.
npm package: @pinaculodigital/openapi-sdk
Description: CLI + code generator that reads an OpenAPI 3.x spec and outputs typed TypeScript SDK modules with axios
Author: Pináculo Digital
Latest version: 0.1.5

# @pinaculo/openapi-sdk 🦍

> Generate typed TypeScript SDK modules from any OpenAPI 3.x spec — powered by axios.

## What it does

1. Reads a `schema.json` config from your project root
2. Fetches the OpenAPI spec from the configured URL
3. Generates TypeScript files organized by **tag** (one folder per tag):
   - `*.types.ts` — Input, Params, and Response interfaces
   - `*.module.ts` — Axios-based functions for each endpoint

## Quick Start

```bash
# Install
npm install @pinaculo/openapi-sdk

# Create config
npx openapi-sdk setup --url https://api.example.com/openapi.json

# Edit schema.json with your actual API URL, then:
npx openapi-sdk generate
```

## schema.json

```json
{
  "url": "https://api.example.com/openapi.json",
  "apiKey": "",
  "output": "src/sdk"
}
```

| Field    | Description                          | Required |
|----------|--------------------------------------|----------|
| `url`    | URL to fetch the OpenAPI 3.x spec   | ✅       |
| `apiKey` | Bearer token for authentication      | ❌       |
| `output` | Output directory (default: `src/sdk`)| ❌       |

## Generated Output Example

For an API with a `users` tag:

```
src/sdk/
├── users/
│   ├── users.types.ts    # CreateUserInput, UserResponse, ListUsersParams...
│   └── users.module.ts   # UsersModule.create(), .list(), .getById()...
├── orders/
│   ├── orders.types.ts
│   └── orders.module.ts
└── index.ts              # Barrel export
```

### users.types.ts
```typescript
export interface CreateUserInput {
  name: string;
  email: string;
}

export interface UserResponse {
  id: string;
  name: string;
  email: string;
}
```

### users.module.ts
```typescript
import axios from 'axios';
import type { CreateUserInput, UserResponse } from './users.types';

const BASE_URL = process.env.API_URL || '';

export const UsersModule = {
  create: (body: CreateUserInput): Promise<UserResponse> =>
    instance.post(`${BASE_URL}/users`, body).then(r => r.data),
  // ...
};
```

## Usage in your code

```typescript
import { UsersModule } from './sdk';

const user = await UsersModule.create({ name: 'Mangu', email: 'mangu@pinaculo.com' });
const users = await UsersModule.list({ page: 1, limit: 10 });
```

## Environment Variables

- `API_URL` — Base URL for API requests (used at runtime by generated modules)

## Development

```bash
npm install
npm run build
```

## License

MIT — Pináculo Digital 🦍🍌
npm package: @pinage404/copy-text
Description: Element that copy text (or current URL by default) then notify with a `paper-toast`
Latest version: 0.1.2

# \<copy-text\>

[![Pipeline status][pipeline-badge]][pipeline]
[![Published on NPM][npm-badge]][npm]
[![MIT License][license-badge]][license]

Element that copy text (or current URL by default) then notify with a `paper-toast`

- [Install](#install)
	- [Install with Yarn](#install-with-yarn)
	- [Install with NPM](#install-with-npm)
		- [Simple install](#simple-install)
		- [Manual install](#manual-install)
	- [Install with Bower](#install-with-bower)
- [Usage](#usage)
	- [Simplest usage](#simplest-usage)
	- [Full usage](#full-usage)
- [License](#license)


## Install

### Install with Yarn

Using [Yarn][yarn]

```sh
$ yarn add copy-text
```


### Install with NPM

#### Simple install

```sh
$ npm install copy-text
```


#### Manual install

First, make sure you have [Bower][bower] and [Polymer CLI][polymer-cli] installed

```sh
$ npm install copy-text --no-optional
```


### Install with Bower

First, make sure you have [Bower][bower] and [Polymer CLI][polymer-cli] installed

```sh
$ bower install copy-text --save
$ npm run-script analyze # if you need to watch the documentation
```


## Usage

### Simplest usage

<!--
```html
<custom-element-demo>
	<template>
		<link rel="import" href="copy-text.html" />
		<next-code-block></next-code-block>
	</template>
</custom-element-demo>
```
-->

```html
<copy-text></copy-text>
```

### Full usage

<!--
```html
<custom-element-demo>
	<template>
		<next-code-block></next-code-block>
	</template>
</custom-element-demo>
```
-->

```html
<copy-text
	text="This is not an URL"
	message-on-success="Text copied with success"
	message-on-error="Oops! Something goes wrong while copying"
>
	<button type="button">Click to copy</button>
</copy-text>
```


## License

[MIT Licence][license]



[pipeline-badge]: https://gitlab.com/pinage404/copy-text/badges/master/pipeline.svg
[pipeline]:       https://gitlab.com/pinage404/copy-text/commits/master

[npm-badge]: https://img.shields.io/npm/v/copy-text.svg
[npm]:       https://www.npmjs.com/package/copy-text

[license-badge]: https://img.shields.io/badge/license-MIT-green.svg
[license]:       https://gitlab.com/pinage404/copy-text/blob/master/LICENSE

[yarn]: https://yarnpkg.com

[bower]:       https://bower.io/#install-bower
[polymer-cli]: https://www.npmjs.com/package/polymer-cli
npm package: @pinaid/formula
Description: Formula package
Latest version: 1.0.9

# Formula


## Installation

npm:
```
$ npm install --save @pinaid/formula
```

yarn:
```
$ yarn add @pinaid/formula
```

## Usage
Once the package is installed, you can import the library using `import` or `require` approach:

```
import formula from '@pinaid/formula`;

console.log(formula.version);

// or

import { version } from '@pinaid/formula`;

console.log(version);

// or

const formula = require('@pinaid/formula);

console.log(formula.version);
```

## APIs
| Function/Scoped Function        | Docs                                                                                                       |
|---------------------------------|------------------------------------------------------------------------------------------------------------|
| `fv`                            | [README](https://gitlab.com/pinaid/npm-goal-package/-/blob/purba/packages/formula/src/fv/README.md)        |
| `pv`                            | [README](https://gitlab.com/pinaid/npm-goal-package/-/blob/purba/packages/formula/src/pv/README.md)        |
| `pmt`                           | [README](https://gitlab.com/pinaid/npm-goal-package/-/blob/purba/packages/formula/src/pmt/README.md)       |
| `compound`                      | [README](https://gitlab.com/pinaid/npm-goal-package/-/blob/purba/packages/formula/src/compound/README.md)  |
| `goal` (scoped)                 | [README](https://gitlab.com/pinaid/npm-goal-package/-/blob/purba/packages/formula/src/goal/README.md)      |


## Test & Development
From root project:
```
$ npm run test:watch --workspace=@pinaid/formula
```

From formula directory:
```
$ npm run test:watch
```

## Run Examples
Run the package as dev & watch mode:
```
$ npm run dev --workspace=@pinaid/formula
```

Run the examples:
```
$ cd packages/formula/examples
$ npm start
```

## Build
From root project:
```
$ npm run build --workspace=@pinaid/formula
```

## Versioning & Add Changelogs

### Create changelog draft:
```
$ npm run changeset
```

Update draft inside `.changeset/newly-added-draft-file-name.json`

### Bump version & update `CHANGELOG.md`
```
$ npm run changeset:version
```

## Publishing
Publish the package to npm:

Need authentication (one time) before publishing to npm, run:
```
$ npm adduser
```
### Publish:
```
$ npm publish --workspace=@pinaid/formula
```
npm package: @pinala/utils
Description: [![Coverage Status](https://coveralls.io/repos/github/jielibang/jtools/badge.svg?branch=master)](https://coveralls.io/github/jielibang/jtools?branch=master) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses
Latest version: 1.1.0


[![Coverage Status](https://coveralls.io/repos/github/jielibang/jtools/badge.svg?branch=master)](https://coveralls.io/github/jielibang/jtools?branch=master)
[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)
![NpmVersion](https://img.shields.io/npm/v/npm.svg)

### Description:

前端 js 工具库: 封装常用的工具函数，如日期格式化、浏览器判断等，提高开发效率

<!-- [Document](https://pasoul.github.io/jtools/api-docs/) -->

## Todo

- [x] 引入代码校验工具 eslint
- [x] jsdocs 自动化生成 api 文档
- [x] 测试覆盖率统计 coverage
- [x] 按需加载
- [x] 支持浏览器环境，node 环境、es6 环境

### 如何使用:

1. 直接下载 `lib` 目录下的 `index.js` 使用
2. 使用 npm 安装

<!-- #### 浏览器：

```js
<script src="jtools.min.js"></script>
<script>
    var result = jtools.add(1, 2)
</script>
``` -->

<!-- #### npm:

`npm i @pinala/utils`

##### 全部加载（webpack、RequireJS、SeaJS 等）：

```js
var jtools = require("jlb-tools");
var result = jtools.add(1, 2);
```

#### es6

```js
import jtools from "jlb-tools";
var result = jtools.add(1, 2);
```

### 按需加载

结合[babel-plugin-import-load](https://github.com/Pasoul/babel-plugin-import-load)按需加载可以极大的减小依赖包的体积

```js
import { add } from "jlb-tools";
var result = add(1, 2);
```

#### 自动化生成文档

[JSDoc](http://www.css88.com/doc/jsdoc/about-configuring-jsdoc.html)是一个根据 javascript 文件中注释信息，生成 JavaScript 应用程序或库、模块的 API 文档 的工具。你可以使用他记录如：命名空间，类，方法，方法参数等。类似 JavaDoc 和 PHPDoc。现在很多编辑器或 IDE 中还可以通过 JSDoc 直接或使用插件生成智能提示。从而使开发者很容易了解整个类和其中的属性和方法，并且快速知道如何使用，从而提高开发效率，降低维护成本。

`yarn run doc`

### 扩展

如果你想添加自己的工具库，在 `src` 目录创建文件，对应 `test` 目录添加测试用例，执行 `yarn test`

### 贡献方法

- fork 本仓库到自己账户。
- 新建一个分支来开始您的工作，分支的名字为 `feature_功能名称` 或者 `buxfix_issueId`。
- 完成功能后请在 test 目录添加完整测试。
- 完成后，发送一个 pull request 到 Pasoul/jtools。
- 等待核心开发者做 CodeReview。
- 最后，恭喜你贡献成功。 -->
npm package: @pinana/claudesync
Description: Sync your Claude Code config across machines. Dotfiles for Claude.
Author: Pinar Kaya
Latest version: 0.1.7
Deprecated: Not ready for use yet - testing in progress

# claudesync

[![npm](https://img.shields.io/npm/v/@pinana/claudesync)](https://www.npmjs.com/package/@pinana/claudesync)
[![licence](https://img.shields.io/npm/l/@pinana/claudesync)](./LICENSE)

Sync your Claude Code config across machines.

## Quick start

```bash
npx @pinana/claudesync init
```

The interactive setup imports your existing `~/.claude` config, creates symlinks, and optionally initialises a git repo.

## What gets synced

| Item | Path |
|------|------|
| Global instructions | `CLAUDE.md` |
| Settings | `settings.json` |
| Custom agents | `agents/` |
| Slash commands | `commands/` |
| Hooks | `hooks/` |
| Skills | `skills/` |
| Project memory | `projects/*/memory/` |
| Project instructions | `projects/*/CLAUDE.md` |

Everything lives in the `config/` directory of your repo.

## What stays local

Credentials, session data, cache, and conversation history never leave your machine. Only the items listed above are synced.

## Second machine setup

```bash
git clone <your-repo-url> ~/claudesync
cd ~/claudesync
./setup.sh
```

## Day-to-day

```bash
git add -A && git commit -m "update config"
git push
```

On other machines, `git pull && ./setup.sh` picks up the changes.

## How it works

The `config/` directory in your repo is the single source of truth. During setup, each item inside `config/` is symlinked into `~/.claude`, so editing either location updates both. Existing files are backed up before being replaced.

## Bash fallback

If you prefer not to use Node, the included `setup.sh` handles symlink creation directly. Run `./setup.sh --import` on a fresh machine to import existing config before linking.

## Upstream updates

To pull in changes from the upstream template:

```bash
git remote add upstream https://github.com/pkaya89/claudesync.git
git pull upstream main
```

## Licence

MIT
npm package: @pinata/ipfs-gateway-tools
Description: Toolkit for working with IPFS Gateways and CIDs
Author: Matt Ober
Latest version: 1.3.0

# IPFS Gateway Tools

IPFS Gateway Tools

## Overview

This toolkit contains helper functions for working with IPFS gateway URLs and transforming them as desired.

This package comes with a distributions for the browser and for NodeJS. Take care to ensure you are importing or requiring in the right version.

## Installation

```
npm install --save @pinata/ipfs-gateway-tools
```

## Browser Setup

To require this in your project simply include the library at the top of your file like so:

```javascript
import IPFSGatewayTools from "@pinata/ipfs-gateway-tools/dist/browser";
const gatewayTools = new IPFSGatewayTools();
```

## NodeJS Setup

```javascript
const IPFSGatewayTools = require("@pinata/ipfs-gateway-tools/dist/node");
const gatewayTools = new IPFSGatewayTools();
```

## Usage

The IPFS gateway toolkit currently contains the following functions:

- [containsCID](#containsCID-anchor)
- [convertToDesiredGateway](#convertToDesiredGateway-anchor)

<a name="containsCID-anchor"></a>

### containsCID

##### `ipfsGatewayTools.containsCID(url)`

##### Params

- `url` - A gateway url that should take one of the following forms:
  - `ipfs://CID`
  - `ipfs://ipfs/CID`
  - `https://example-gateway.com/ipfs/CID`
  - `https://example-gateway.com/ipfs/CID/exampleFile.json`
  - `https://example-gateway.com/ipns/CID`

#### Response

```
{
    containsCid: (Boolean) - True if the url contains a CID,
    cid: (string) - The CID that the url contains if "containsCid" is true
}
```

<a name="convertToDesiredGateway-anchor"></a>

### convertToDesiredGateway

##### `ipfsGatewayTools.convertToDesiredGateway(sourceUrl, desiredGatewayPrefix)`

##### Params

- `sourceUrl` - A gateway url that should take one of the following forms:
  - `ipfs://CID`
  - `ipfs://ipfs/CID`
  - `https://example-gateway.com/ipfs/CID`
  - `https://example-gateway.com/ipfs/CID/exampleFile.json`
  - `https://example-gateway.com/ipns/CID`
- `desiredGatewayPrefix` - The desired gateway you want to convert your source URL to. A few examples of this would be:
  - `https://mygateway.mypinata.cloud`
  - `https://ipfs.io`

#### Response

Returns a string that uses the desired source gateway prefix.

Example code:

```javascript
const sourceUrl =
  "https://exampleGateway.com/ipfs/bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m";
const desiredGatewayPrefix = "https://mygateway.mypinata.cloud";
const convertedGatewayUrl = ipfsGatewayTools.convertToDesiredGateway(
  sourceUrl,
  desiredGatewayPrefix
);

//In the example above, the resulting value for convertedGatewayUrl would be: https://mygateway.mypinata.cloud/ipfs/bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m
```

## Questions? Issues? Suggestions?

Feel free to file a github issue or email us at team@pinata.cloud

We'd love to hear from you!
npm package: @pinatajs/core
Description: Bundler is a tool for dealing with JS bundling.
Author: Edward Pasenidis
Latest version: 1.0.8

# Piñata 📦

Bundler is a tool for dealing with JS bundling.

## Table of Contents
- [Piñata 📦](#pi-ata---)
  * [How it works](#how-it-works)
    + [What is Bundling?](#what-is-bundling-)
    + [Ok, but how?](#ok--but-how-)
    + [Parsing the entry file](#parsing-the-entry-file)
    + [Dependency graphs](#dependency-graphs)
  * [Installation](#installation)
  * [Usage](#usage)
  * [Contributing](#contributing)

## How it works

### What is Bundling?
Bundling is a technique used by developers to reduce the number of HTTP requests for JS files to the minimum. Essentially, in the front end world, to bundle something is to put your whole project into a big, sometimes obfuscated or minified, JS file.

### Ok, but how?
Well, here are the steps my bundler takes:
- Parse the entry file and generate an **AST**;
- Create a **dependency graph**;
- Create an **AST** for every dependency;
- **Transpile** everything with Babel

### Parsing the entry file
To find the dependencies inside a file, we need to parse it. We can do this using AST (or simply syntax trees) parsers.

Now that we know our dependencies, we store them into a list for later.

![JS to AST](https://raw.githubusercontent.com/pasenidis/js-bundler/main/docs/assets/01.png)

### Dependency graphs
A dependency graph represents dependencies of the project files towards each other.

The example below is the visual dependency graph representation of the example files of this repository.

![Dependency Graph](https://raw.githubusercontent.com/pasenidis/js-bundler/main/docs/assets/02.png)

## Installation

Just install the package:

```bash
npm i -D @pinatajs/core  # -D means --save-dev which appends the package to the devDependencies object
# or use yarn if you want
yarn -D @pinatajs/core
# or use pnpm
```

## Usage

Just run the command. (I would suggest you to add it as a script)

```bash
pinata-cli
```

## 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.