open-index/open-npm huggingface dataset:
npm package: @putdotio/eslint-config
Description: Shared eslint config for put.io
Author: put.io
Latest version: 7.0.1

<div align="center">
  <p>
    <img src="https://static.put.io/images/putio-boncuk.png" width="72">
  </p>

  <h1>eslint-config-putio</h1>

  <p>Shared eslint config for put.io's JavaScript projects.</p>

  <p>
    <img src="https://img.shields.io/npm/v/@putdotio/eslint-config" alt="npm (scoped)">
    <img src="https://img.shields.io/github/license/putdotio/eslint-config-putio" alt="GitHub">
  </p>
</div>

## Installation

```bash
yarn add eslint@">8.0" prettier@">2.0 <3.0" @putdotio/eslint-config @putdotio/prettier-config --dev
```

```bash
npm install eslint@">8.0" prettier@">2.0 <3.0" @putdotio/eslint-config @putdotio/prettier-config --save-dev
```

## Usage

Make sure you are using [`@putdotio/prettier-config`](https://github.com/putdotio/prettier-config)

```json
{
  "prettier": "@putdotio/prettier-config"
}
```

To inherit every rule and plugin, add the following to your `.eslintrc` file:

```json
{
  "extends": "@putdotio"
}
```

To only inherit code formatting, add the following to your `.eslintrc` file:

```json
{
  "extends": "@putdotio/formatting"
}
```
npm package: @putdotio/pas-js
Description: Browser analytics client for the put.io Analytics System.
Author: put.io
Latest version: 3.0.0

<div align="center">
  <p>
    <img src="https://static.put.io/images/putio-boncuk.png" width="72" alt="put.io boncuk">
  </p>

  <h1>pas-js</h1>

  <p>Browser analytics client for the put.io Analytics System.</p>

  <p>
    <a href="https://github.com/putdotio/pas-js/actions/workflows/ci.yml?query=branch%3Amaster" style="text-decoration:none;"><img src="https://img.shields.io/github/actions/workflow/status/putdotio/pas-js/ci.yml?branch=master&style=flat&label=ci&colorA=000000&colorB=000000" alt="CI"></a>
    <a href="https://www.npmjs.com/package/@putdotio/pas-js" style="text-decoration:none;"><img src="https://img.shields.io/npm/v/%40putdotio%2Fpas-js?style=flat&colorA=000000&colorB=000000" alt="npm version"></a>
    <a href="https://github.com/putdotio/pas-js/blob/master/LICENSE" style="text-decoration:none;"><img src="https://img.shields.io/github/license/putdotio/pas-js?style=flat&colorA=000000&colorB=000000" alt="license"></a>
  </p>
</div>

## Installation

Install with npm:

```bash
npm install @putdotio/pas-js
```

## Quick Start

```ts
import createPasClient from "@putdotio/pas-js";

const pas = createPasClient();

pas.identify({
  id: "42",
  hash: "signed-user-hash",
  properties: {
    plan: "pro",
  },
});

pas.track("transfer_completed", {
  transfer_id: 123,
});
```

## Browser Tracking

The default client keeps an anonymous identifier in browser cookies and can send identity, event, and page-view payloads to PAS:

```ts
import createPasClient from "@putdotio/pas-js";

const pas = createPasClient();

pas.alias({ id: "42", hash: "signed-user-hash" });
pas.pageView();
```

## API

| Method Name  | Parameters                                                   |
| :----------- | :----------------------------------------------------------- |
| **alias**    | `({ id: string/number, hash: string })`                      |
| **identify** | `({ id: string/number, hash: string, properties?: object })` |
| **track**    | `(name: string, properties?: object)`                        |
| **pageView** | -                                                            |

## Docs

- [CONTRIBUTING.md](./CONTRIBUTING.md)
- [SECURITY.md](./SECURITY.md)

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md)

## License

[MIT](./LICENSE)
npm package: @putdotio/prettier-config
Description: Shared prettier config for JavaScript projects.
Author: put.io
Latest version: 2.0.0

<div align="center">
  <p>
    <img src="https://static.put.io/images/putio-boncuk.png" width="72">
  </p>

  <h1>prettier-config</h1>

  <p>Shared prettier config for put.io's JavaScript projects.</p>

  <p>
    <img src="https://img.shields.io/npm/v/@putdotio/prettier-config" alt="npm (scoped)">
    <img src="https://img.shields.io/github/license/putdotio/prettier-config" alt="GitHub">
  </p>
</div>

## Installation

```bash
pnpm add prettier @putdotio/prettier-config -D
```

## Usage

Add [`@putdotio/prettier-config`](https://github.com/putdotio/prettier-config) to your `package.json`:

```json
{
  "prettier": "@putdotio/prettier-config"
}
```
npm package: @putdotio/socket-client
Description: SockJS client for real-time put.io events.
Author: put.io
Latest version: 5.0.0

<div align="center">
  <p>
    <img src="https://static.put.io/images/putio-boncuk.png" width="72" alt="put.io boncuk">
  </p>

  <h1>putio-sockjs</h1>

  <p>SockJS client for real-time put.io events.</p>

  <p>
    <a href="https://github.com/putdotio/putio-sockjs/actions/workflows/ci.yml?query=branch%3Amaster" style="text-decoration:none;"><img src="https://img.shields.io/github/actions/workflow/status/putdotio/putio-sockjs/ci.yml?branch=master&style=flat&label=ci&colorA=000000&colorB=000000" alt="CI"></a>
    <a href="https://www.npmjs.com/package/@putdotio/socket-client" style="text-decoration:none;"><img src="https://img.shields.io/npm/v/%40putdotio%2Fsocket-client?style=flat&colorA=000000&colorB=000000" alt="npm version"></a>
    <a href="https://github.com/putdotio/putio-sockjs/blob/master/LICENSE" style="text-decoration:none;"><img src="https://img.shields.io/github/license/putdotio/putio-sockjs?style=flat&colorA=000000&colorB=000000" alt="license"></a>
  </p>
</div>

## Installation

Install with npm:

```bash
npm install @putdotio/socket-client
```

## Quick Start

```ts
import { createPutioSocketClient, EVENT_TYPE } from "@putdotio/socket-client";

const client = createPutioSocketClient({
  token: process.env.PUTIO_TOKEN!,
});

const unsubscribe = client.on(EVENT_TYPE.TRANSFER_UPDATE, (payload) => {
  console.log(payload);
});

client.on(EVENT_TYPE.CONNECT, () => {
  client.send({
    type: "custom",
    value: { hello: "world" },
  });
});
```

## Events

The package exports typed event names and payload maps for the socket stream:

```ts
import { EVENT_TYPE, type SocketEvents } from "@putdotio/socket-client";

const event: SocketEvents["TransferUpdate"] = {
  type: EVENT_TYPE.TRANSFER_UPDATE,
  value: {
    id: 1,
  },
};
```

## Docs

- [CONTRIBUTING.md](./CONTRIBUTING.md)
- [SECURITY.md](./SECURITY.md)

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md).

## License

[MIT](./LICENSE)
npm package: @putdotio/utilities
Author: put.io
Latest version: 1.17.0

<div align="center">
  <p>
    <img src="https://static.put.io/images/putio-boncuk.png" width="72">
  </p>

  <h1>js-utilities</h1>

  <p>
    Shared utilities for put.io's JavaScript projects.
  </p>

  <p>
    <a href="https://github.com/putdotio/js-utilities/actions/workflows/build.yml"><img src="https://img.shields.io/github/actions/workflow/status/putdotio/js-utilities/build.yml?branch=main" alt="Build Status"></a>
   <a href='https://coveralls.io/github/putdotio/js-utilities?branch=main'><img src='https://coveralls.io/repos/github/putdotio/js-utilities/badge.svg?branch=main' alt='Coverage Status' /></a>
    <img src="https://img.shields.io/npm/v/@putdotio/utilities" alt="npm (scoped)">
    <img src="https://img.shields.io/bundlephobia/minzip/@putdotio/utilities" alt="npm bundle size (scoped)">
    <img src="https://img.shields.io/github/license/putdotio/js-utilities" alt="GitHub">
  </p>
</div>
npm package: @puthnith/eslint-config-dust
Description: The simplest ESLint configuration integrated with Prettier
Author: Puthnith Var
Latest version: 1.2.0

# @puthnith/eslint-config-dust

[![npm version](https://badge.fury.io/js/%40puthnith%2Feslint-config-dust.svg)](https://badge.fury.io/js/%40puthnith%2Feslint-config-dust)

> The simplest ESLint configuration integrated with Prettier

## Peer Dependencies

This package requires [`typescript`](https://www.npmjs.com/package/typescript) (`^3.x`) and [`eslint`](https://www.npmjs.com/package/eslint) (`^7.x`).

## Setup

1. Install this package and its dependencies

```
npm i --save-dev typescript eslint @puthnith/eslint-config-dust
```

2. Add it to your `.eslintrc.json` or `package.json`

```json
{ "extends": "@puthnith/dust" }
```

```json
{ "eslintConfig": { "extends": "@puthnith/dust" } }
```

### Vscode

If you use **vscode**, you may want to fix the code on save. This requires two extensions, [microsoft/vscode-eslint](https://github.com/Microsoft/vscode-eslint) and [prettier/prettier-vscode](https://github.com/prettier/prettier-vscode). After you have the extensions, you can add the below configuration to your global or local settings (`.vscode/settings.json`).

```json
{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}
```

If you use `prettier`, you may want to config in the settings.

```json
{
  "prettier.printWidth": 120,
  "prettier.semi": false,
  "prettier.singleQuote": false,
  "prettier.tabWidth": 2,
  "prettier.trailingComma": "all"
}
```

If you don't want to pollute your settings, you can add this to your project, `package.json` or `.prettierrc`.

```json
{
  "prettier": {
    "printWidth": 120,
    "semi": false,
    "singleQuote": false,
    "tabWidth": 2,
    "trailingComma": "all"
  }
}
```

Check out [puthnith/hello-node](https://github.com/puthnith/hello-node) for a project template using this package.
npm package: @puthnith/pin-cli
Description: Personnummer CLI
Author: Puthnith Var
Latest version: 1.0.1

# @puthnith/pin-cli

[![NPM Version](https://img.shields.io/npm/v/@puthnith/pin-cli)](https://www.npmjs.com/package/@puthnith/pin-cli) ![NPM Downloads](https://img.shields.io/npm/dw/@puthnith/pin-cli)

Generate Swedish personnummer (personal identity number)

## Install

```none
npm install -g @puthnith/pin-cli
```

## Usage

```none
λ pin --help

Options:
  -g, --gender   Specify gender otherwise random     [choices: "male", "female"]
  -f, --format   Specify format otherwise short
                                   [choices: "short", "long"] [default: "short"]
  -c, --count    Specify count otherwise 1 (max: 50)       [number] [default: 1]
  -v, --version  Show version number                                   [boolean]
  -h, --help     Show help                                             [boolean]

Examples:
  pin // 320611-5366
  pin 2020-01-01 // 200101-4451
  pin 2020-01-01 --gender female --format long // 202001010681
```

## Example

Generate `5` pins for `2020-01-01`

```none
λ pin --count 5 2020-01-01

200101-6621
200101-5326
200101-0509
200101-5763
200101-0657
```
npm package: @puti94/gql-utils
Description: graphql 工具
Author: puti94
Latest version: 0.5.0

# graphql 工具，包括生成graphql请求文本，生成graphql-adapter的客户端

## 安装
```bash
$ yarn add @puti94/gql-utils // or npm i @puti94/gql-utils --save
```

## 生成字符串示例
```js
  import {generateFieldText} from '@puti94/gql-utils'
  generateFieldText('query', {
       fields: {
         a: {
           alias: 'alias',
           args: {a: 'a', b: 1, c: false, d: ['a', 1, true, new Utils.GqlEnum('menu')]},
           fields: ["a"]
         }
       }
     });
  // 'query{alias:a(a:"a",b:1,c:false,d:["a",1,true,menu]){a}}'
```
## 创建apiClient示例
```js
  import {createApiClient} from '@puti94/gql-utils'
  import {ApolloClient} from "@apollo/client";
  //元数据可由graphql-adapter 的 _metadataMap 字段获取
  const metadata = {
    user:{
      type:'User',
      name:'User',
      createAble:true,
      pkName:"uid",
      editable:true,
      removeAble:true,
      fields:{
        uid:{
          type:"ID",
          primaryKey:true
        },
        name:{
          type:"String"
        },
      }
    }
  }
  const api = createApiClient(metadata, {
       client: new ApolloClient({...}),
       useQuery,
       useMutation
     });
   //简单使用
   api.user.one.query().then(res=>console.log(res.data.uid))
   const {data} = api.user.one.useQuery()

   const {mutate} = api.user.create.useMutation()

   mutate({data:{name:"张三"}})
```