open-index/open-npm huggingface dataset:
npm package: @mykulyak/json-api
Description: JSON:API request &amp; response helpers.
Author: Andriy Mykulyak
Latest version: 0.4.2

# json-api

JSON:API request &amp; response helpers.

![Travis](https://travis-ci.org/mykulyak/json-api.svg?branch=master)
![NPM](https://img.shields.io/npm/v/@mykulyak/json-api)
![Licence](https://img.shields.io/npm/l/@mykulyak/json-api)

## Why json-api ?

Because formatting and parsing [JSON:API](https://jsonapi.org/) data by hand is tedious and error-prone.

## Install

Install from the NPM repository using `npm` or `yarn`.

```shell
npm install @mykulyak/json-api
```

```shell
yarn add @mykulyak/json-api
```

## Quick start

Consider a simple blog API designed according to [JSON:API spec](https://jsonapi.org/format/). It returns article, author and comment resources:

- author may have zero or more articles
- article has one author
- article may have zero or more comments

The API request for creating a new article might look somethling like this:

```json
{
  "data": {
    "type": "create-article",
    "attributes": {
      "title": "Why should we use JSON:API ?",
      "content": "..."
    },
    "relationships": {
      "author": {
        "type": "author",
        "id": "123"
      }
    }
  },
  "jsonapi": { "version": "1.0" }
}
```

whereas in the application we would likely have the data look like:

```json
{
  "authorId": 123,
  "title": "Why should we use JSON:API ?",
  "content": "..."
}
```

Using `json-api`, one can build the request from form data in the following way:

```js
import { registry } from '@mykulyak/json-api';

const author = registry.define({
  type: 'author',
});

const createArticle = registry.define({
  type: 'create-article',
  attributes: ['title', 'content'],
  relationships: {
    author: {
      attribute: 'authorId',
      resource: author,
    },
  },
});

const request = createArticle.resource({
  authorId: 123,
  title: "Why should we use JSON:API ?",
  content: "..."
});
```

## Documentation

- [Introduction](/docs/intro.md)
- [API](/docs/api.md)
- [FAQ](/docs/faq.md)

## Examples

TODO.

Perhaps above-mentioned blog API would be a good example.

## Dependencies

None.

## Credits

TODO.
npm package: @mykulyak/linterpol
Description: Script that runs NPM commands (usually checks/tests) for modified packages
Author: Andriy Mykulyak
Latest version: 0.2.0

# linterpol

Operates on monorepo packages versioned by Git. Allows you to run multiple
NPM scripts on those packages those files have been modified with respect
to their remote versions. I would typically use it when working on multiple
NPM package simultaneously, to run linters, tests etc.

# Usage

```bash
npm install @mykulyak/linterpol
```

```bash
npx linterpol MONOREPO_ROOT_DIR [COMMAND1 [, COMMAND ...]
```

where:

- `MONOREPO_ROOT_DIR` is the directory with monorepo `package.json` is located
- `COMMAND#` are names of NPM scripts to be executed for each modified package.
  Commands will be executed sequentially in the order specified in the CLI

# Thanks

Thanks to [Piotr Kowalczyk](https://github.com/kpiotr) for suggesting the name.
npm package: @mykyta-isai/eslint-config
Description: My shared ESLint configuration
Author: Mykyta Isai
Latest version: 1.0.3

# @mykyta-isai/eslint-config

This is my custom **ESLint configuration** for TypeScript projects, designed to ensure a clean and consistent code style. It includes **TypeScript support**, **import order rules**, and **various best practices**.

## 🚀 Installation

To use this ESLint configuration in your project, install it along with the required peer dependencies:

```bash
npm install --save-dev @mykyta-isai/eslint-config eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import
```

or if you use Yarn:

```bash
yarn add --dev @mykyta-isai/eslint-config eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import
```

🛠️ Usage
To enable this ESLint configuration in your project, create an eslint.config.js file in the root of your project and extend the config from this package.

✅ ESM Projects
If your project uses "type": "module" in package.json, use this:

```bash
// eslint.config.js
import eslintConfig from "@mykyta-isai/eslint-config";

export default eslintConfig;
```

✅ CommonJS Projects
If your project uses the default CommonJS format (no "type": "module" in package.json), use this instead:

```bash
// eslint.config.js
const eslintConfig = require("@mykyta-isai/eslint-config");

module.exports = eslintConfig.default;
```

## 🧪 Example Lint Script
You can add this to your package.json:

```json
"scripts": {
  "lint": "eslint . --ext .ts"
}
```

Then run:

```bash
yarn lint
```
npm package: @mylawn/node-red-contrib-nats
Description: nats Node-RED
Author: mdonhowe
Latest version: 1.0.1

node-red-contrib-nats
=====================

Dead simple node-red wrapper for nats.js.

Install
-------

Run the following command in the root directory of your Node-RED install

```
npm install @mylawn/node-red-contrib-nats
```
npm package: @myleene/wxinvoice
Description: 微信小程序发票抬头选择器，提供组件和API两种使用方式
Latest version: 1.0.5

# @myleene/wxinvoice

微信小程序发票抬头选择器

## 安装

```bash
npm install @myleene/wxinvoice
```

在微信开发者工具中：工具 -> 构建npm

## 使用方式

### 组件方式

```json
{
  "usingComponents": {
    "sqb-wx-invoice-title-picker": "@myleene/wxinvoice"
  }
}
```

```wxml
<sqb-wx-invoice-title-picker query="{{invoiceUrl}}" />
```

### API方式

#### Promise + callback模式（推荐）

```javascript
const { chooseInvoiceTitle } = require('@myleene/wxinvoice/lib');

chooseInvoiceTitle({
  url: 'https://example.com/#/invoice?token=1',
  callback: ({ code, data, message }) => {
    if(code === 'success') {
      // 成功后，处理的逻辑
      console.log('选择成功，返回URL:', data.returnUrl);
    } else if(code === 'cancel') {
      // 取消后，处理的逻辑
      console.log('用户取消选择');
    } else if(code === 'error') {
      // 错误后，处理的逻辑
      console.log('选择失败:', message);
    }
  },
});
```

#### 纯Promise模式

```javascript
chooseInvoiceTitle({
  url: 'https://example.com/#/invoice?token=123'
}).then(({ code, data, message }) => {
  console.log('结果:', { code, message, data });
});
```

## 接口说明

```typescript
interface Result {
  code: 'success' | 'cancel' | 'error';
  message: string;
  data: {
    returnUrl: string;
  };
}
```

- `success`: 用户完成选择
- `cancel`: 用户取消选择  
- `error`: 微信失败、网络类失败

## 许可证

MIT