open-index/open-npm huggingface dataset:
npm package: @ripter/domlens
Description: Update the DOM with CSS selectors
Author: Chris Richards
Latest version: 0.0.4

# DOMLens
Update the DOM with Javascript and CSS Selectors.

## Install

* yarn
  * `yarn add @ripter/domlens`
* npm
  * `npm install --save @ripter/domlens`

## Usage
```
import domLens from '@ripter/domlens';

export default function render(state) {

  // Updates the matching elements on the dom.
  domLens({
    '.gameboard  grid-2d': {
      // Set the .grid property on the matching elements
      grid: function() {
        return state.gameboard;
      },
    },
    '.inventory grid-2d': {
      // Set the .grid property on the matching elements
      grid: function(elm, index) {
        // Use element index to distinguish the specific inventory item.
        return state.inventory[index];
      },
      // Bind events; They will automatically unbind when the element is removed.
      onclick: function(evt, elm, index) {
        state.action('click', index);  
      }
    },
  }, state);

  return state;
};
```

## Concept

Instead of abstracting away the DOM, we want to make it easier to work with Elements and Web Components. A **len** is just like a magnifying glass. It allows you to focus on a small part of a much bigger system. `domLens` allows you to focus on elements using CSS selectors. _(It's `querySelectorAll` under the hood.)_

By using a lens to select specific elements, you can set properties and events matching your state system.

*domLens* allows you to map your application state to elements on the page. This might seem backwards if you are used to React and Angular systems.




### `this` aka `context`
Functions (non-arrow functions) have access to a `this` value. Any context passed to `domLens` will be set as the the `this` value for the `forEach` callback and any functions it invokes.


### Why forEach?
You might be wondering why domLens uses `forEach` instead of a `map` or a `reduce`. The DOM is very fast, if you use it directly instead of using an abstraction or `innerHTML`. This means we want functions that can work on the native Node. Perfect job for `forEach`.

Also, we can take advantage of the native [NodeList.forEach](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach)
npm package: @ripter/mocha-reporter-blink1
Description: Mocha reporter that flashes a blink(1) device red or green.
Author: Chris Richards
Latest version: 0.0.1

# mocha-reporter-blink1
A Mocha reporter for the blink(1) device.

## Install
```
npm install @ripter/mocha-reporter-blink1 --save-dev
```

## Use
```
mocha -R @ripter/mocha-reporter-blink1
```

## Notes:
It works better if you use a tool like `watch` continually run the tests.
npm package: @ripter/store
Description: Basic Store. You can read values. Changing values requires an action that triggers reducers.
Author: Chris Richards
Latest version: 1.2.0


# Store
The idea of the store, is that the data/state is only changed in predictable and testable ways. [`reducers`, `action`] This way the logic can be tested and updated as the application grows. New features can be tested by adding or removing reducers or adding new actions. You can be notified when an action happens by setting an `onChange` function.

```
// create the store
// Set the initial state, a Javascript Object
// Then the reducers that make up the logic of how the state changes.
// Finally a function to be called whenever the state changes.
const store = new Store({initial: 'state'}, [
  reduceFunctions,
], onChange);

// trigger a change
store.action({
  type: 'select',
  id: 'one',
});

// get the state
const init = store.get('initial');
```

## [API](https://ripter.github.io/store/)

## Install
```
npm install --save @ripter/store
```
npm package: @riptidesoftware/x2node-drivers-sqlite3
Description: SQLite3 database driver for x2node-dbos.
Author: Riptide Software
Latest version: 0.0.5

# x2node-drivers-sqlite3

The SQLite Driver for X2Node DBOs.

The driver is passed into the `createDBOFactory()` function instead of the database name as a string.

Example:
```javascript
let dbEngineType = dbEngine;
if (dbEngineType === 'sqlite3') {
    dbEngineType = new x2nodeDriversSqlite3();
}
const dboFactory = dbos.createDBOFactory(recordTypes, dbEngineType);
```
npm package: @riptusk331/react-login
Description: User session management for React
Author: Ryan P. Joyce
Latest version: 0.0.19

# React-Login

React-Login is a library that provides user session management for React applications.

## Installation

Use the package manager [yarn](https://yarnpkg.com/) to install foobar.

```bash
yarn add @riptusk331/react-login
```

## Usage

```javascript
//this is just nonsense to take up space. to be improved
import { login } from "@riptusk331/react-login"

const token = login("Basic", {"bill@excellent.av", "password"}
```

## 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.

## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @riq0h/mtt
Description: mtt - multitool for file operation
Author: Rikuoh Tsujitani
Latest version: 0.0.12

# mtt(multitool)

A multi-tool that performs various operations on files within a directory. Currently, it supports the following features.

## Usage

`npm insatll -g @riq0h/mtt`

## `mtt -r`

Bulk renames filenames within a directory. When launched, `$EDITOR` is called, allowing you to flexibly edit with any editor.

## `mtt -c`

Compresses individual files within a directory. If no filenames are specified, all files will be targeted.

## `mtt -i <files...> -p <value>`

Resizes image files (`.jpg`, `.jpeg`, `.png`, `.gif`, `.webp`) within a directory. The `-p` option is required to specify the resize ratio.
npm package: @riqra/hierarchy-parser
Description: <p align="center">   <img src="https://res.cloudinary.com/riqra/image/upload/v1513825837/github/hierarchy-parser.svg" /> </p>
Author: Riqra
Latest version: 2.1.1

 <p align="center">
  <img src="https://res.cloudinary.com/riqra/image/upload/v1513825837/github/hierarchy-parser.svg" />
</p>

<h1 align="center">
  Hierarchy Parser
</h1>

<p align="center">
  <a href="https://npmjs.org/package/@riqra/hierarchy-parser">
    <img alt="NPM version" src="https://img.shields.io/npm/v/@riqra/hierarchy-parser.svg?style=for-the-badge">
  </a>
  <a href="https://github.com/riqra/hierarchy-parser/actions/workflows/ci.yml">
    <img alt="CI" src="https://img.shields.io/github/workflow/status/riqra/hierarchy-parser/CI?label=CI&style=for-the-badge">
  </a>
  <a href="https://bundlephobia.com/package/@riqra/hierarchy-parser">
    <img alt="Size" src="https://img.shields.io/bundlephobia/minzip/@riqra/hierarchy-parser?style=for-the-badge">
  </a>
</p>

## What's it for?

Relational databases aren't very good at dealing with nested hierarchies.

Examples of hierarchies are:

- Nested folders where each folder has many subfolders, those subfolders themselves have subfolders, and so on
- Categories and sub-categories e.g. for a newspaper with sections for different sports, Sports category splits into Track Sports and Water Sports, Water Sports into Swimming and Diving, Diving into High Board, Middle Board and Low Board etc
- Tree structures

## How to use

| Name                      | Type     | Default      | Description                    |
| ------------------------- | -------- | ------------ | ------------------------------ |
| `data`                    | `Array`  |              | Data to be parsed              |
| `options`                 | `Object` |              | Parser options                 |
| `options.identifier`      | `String` | `"id"`       | Children identifier            |
| `options.parentKey`       | `String` | `"parentId"` | Parent identifier              |
| `options.initialParentId` | `String` |              | Initial level in the hierarchy |

## Example

```json
[
  {
    "id": 1,
    "name": "Home",
    "parentId": null
  },
  {
    "id": 2,
    "name": "Tech",
    "parentId": null
  },
  {
    "id": 3,
    "name": "Decor",
    "parentId": 1
  },
  {
    "id": 4,
    "name": "Bath",
    "parentId": 1
  },
  {
    "id": 5,
    "name": "Games",
    "parentId": 2
  },
  {
    "id": 6,
    "name": "Frames",
    "parentId": 3
  }
]
```

this data will become

```json
[
  {
    "id": 1,
    "name": "Home",
    "children": [
      {
        "id": 3,
        "name": "Decor",
        "children": [
          {
            "id": 6,
            "name": "Frames"
          }
        ]
      },
      {
        "id": 4,
        "name": "Bath"
      }
    ]
  },
  {
    "id": 2,
    "name": "Tech",
    "children": [
      {
        "id": 5,
        "name": "Games"
      }
    ]
  }
]
```

see [tests](https://github.com/riqra/hierarchy-parser/tree/master/test) for more examples
npm package: @riqtu/tiktok-scraper
Description: Modified TikTok Scraper with proxy support
Author: FrierenDv
Latest version: 1.0.0

---

# Tiktok Video Fetcher

This project provides a TypeScript module for fetching and parsing TikTok videos and user profiles. The module allows you to fetch raw data from TikTok and optionally parse the data into a structured format, including the ability to dynamically add specific properties from the fetched data to the parsed result.

## Features

- **Fetch TikTok Data**: Retrieve raw data for TikTok videos and user profiles.
- **Parse Data**: Optionally parse the fetched data into a structured format.
- **Dynamic Key Inclusion**: Add specific properties from the fetched data to the parsed result.

## Installation

To install the dependencies and use the module, run:

```bash
npm install @xct007/tiktok-scraper
```

## Usage

Here’s how you can use the module to fetch and parse TikTok video data:

### Fetch Raw Data

```typescript
import Tiktok from "@xct007/tiktok-scraper";

Tiktok("https://vt.tiktok.com/ZGJBtcsDq/", {
	// Without parse option
	// The raw data will be returned
	parse: false,
})
	.then((data) => {
		console.log("Aweme List:", data);
	})
	.catch((error) => {
		console.error(error);
	});
```

### Parse Data with Specific Keys

You can specify the keys you want to include in the parsed result:

```typescript
import Tiktok from "@xct007/tiktok-scraper";

Tiktok("https://vt.tiktok.com/ZGJBtcsDq/", {
	parse: true,
	keys: ["desc_language"],
})
	.then((data) => {
		// The desc_language key
		// will be included in the parsed result
		console.log("Parsed Data:", data.desc_language);
	})
	.catch((error) => {
		console.error(error);
	});
```

## API

### `Tiktok(url: string, options?: ITiktokOptions): Promise<Aweme[] | IParsed | Partial<IParsed>>`

Fetches TikTok video or user profile data based on the provided URL.

- **url**: The URL of the TikTok video or user profile.
- **options**: Optional configuration options:
  - **parse**: `boolean` - If `true`, the data will be parsed, otherwise the raw data will be returned.
  - **keys**: `Array<keyof Aweme>` - Specify the keys to include in the parsed result.

Returns a `Promise` that resolves to either an array of `Aweme` objects, a full `IParsed` object, or a `Partial<IParsed>` object if keys are specified.

### `IParsed`

An interface that defines the structure of the parsed TikTok data. This structure can be extended dynamically based on the specified keys.

## Contributing

If you’d like to contribute to this project, feel free to submit a pull request or open an issue.

## Credits

This project was developed by **FrierenDv**.

## License

This project is licensed under the MIT License.

---
npm package: @rir360/create-express
Description: **The definitive, production-ready TypeScript + Express starter.** Architected for speed, type-safety, and seamless deployment.
Latest version: 1.0.0

# Express API Starter (Typescript)

**The definitive, production-ready TypeScript + Express starter.** Architected for speed, type-safety, and seamless deployment.

[![npm version](https://img.shields.io/npm/v/@rir360/create-express.svg)](https://www.npmjs.com/package/@rir360/create-express)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

---

## Quick Start

You don't need to clone or download anything. Initialize your next big project with a single command:

```bash
npx create-rir360-express my-awesome-app
```

## ts-express-boilerplate

A high-performance, strictly typed starter for modern Node.js applications. Designed for developers who want the latest features of Express 5 and Node 24 without the bloat.

## Core Stack
- **Node 24**: Utilizing the latest LTS/Active features and performance.
- **Express 5**: Native support for async error handling (no `try/catch` wrappers).
- **TypeScript (ESM)**: Modern ES Modules with strict type safety.
- **Docker Ready**: Multi-stage builds for ultra-small production images (~150MB).

## Structure
```text
├── src/
│   ├── app.ts        # App configuration & Global Error Handler
│   ├── server.ts     # Entry point & Server listener
├── dockerfile        # Optimized multi-stage build
├── tsconfig.json     # Modern TS configuration
└── .dockerignore     # Keeps your images clean
npm package: @rir360/ui
Description: CLI for adding reusable UI components to your project
Author: rir360
Latest version: 1.1.1

# Reusable UI components for Next.js/React

CLI for adding reusable UI components to your React/Next.js projects.

## Installation

No installation required! Use with `npx`:
```bash
npx @rir360/ui add <component>
```

## Usage
```bash
# Add a single component
npx @rir360/ui add splide

# Add multiple components
npx @rir360/ui add splide button card

# Specify custom path
npx @rir360/ui add splide
# Then enter your preferred path when prompted
```

## Available Components

| Component | Description |
| :--- | :--- |
| `header` | Sticky navigation with logo, mobile drawer, and optional banner. |
| `hero` | Impactful hero section with title, description, and media. |
| `section` | Base layout wrapper for consistent spacing and width. |
| `editorial` | Versatile two-column layout for text and images (reversible). |
| `grid` | Responsive grid system for content organization. |
| `card` | Versatile card component with image, title, and CTA. |
| `contact-form` | Ready-to-use form with basic validation and Tailwind styling. |
| `splide` | Optimized Splide carousel wrapper with auto-scroll support. |
| `footer` | Clean footer with navigation links, social icons, and copyright. |


View all components: [github.com/rir360/ui](https://github.com/rir360/ui)

## How it works

1. Fetches component code from the registry
2. Adds it to your project (default: `components/rir360/`)
3. Shows you which dependencies to install

Components are copied to your project, so you have full control to customize them!
npm package: @ririnto/amazon-bedrock-anthropic
Description: Amazon Bedrock Anthropic InvokeModel API provider - drop-in replacement for @ai-sdk/amazon-bedrock
Latest version: 0.0.1

# @ririnto/amazon-bedrock-anthropic

Amazon Bedrock Anthropic InvokeModel API provider - drop-in replacement for `@ai-sdk/amazon-bedrock`.

## Features

- Uses InvokeModel API via `@ai-sdk/amazon-bedrock/anthropic` (not Converse API)
- Transforms `bedrock.cachePoint` → `anthropic.cacheControl` automatically
- Drop-in replacement for `createAmazonBedrock` from `@ai-sdk/amazon-bedrock`

## Usage

Add to OpenCode's `package.json` overrides:

```json
{
  "overrides": {
    "@ai-sdk/amazon-bedrock": "npm:@ririnto/amazon-bedrock-anthropic@latest"
  }
}
```

For local development (package directory):

```json
{
  "overrides": {
    "@ai-sdk/amazon-bedrock": "file:../amazon-bedrock-invokemodel"
  }
}
```

For local development (single file):

```json
{
  "overrides": {
    "@ai-sdk/amazon-bedrock": "../amazon-bedrock-invokemodel/dist/index.js"
  }
}
```

## License

MIT
npm package: @ririxin/talking-avatar-sdk
Description: 文本驱动数字人的js sdk, typescript 版本
Latest version: 1.0.3

# Talking Avatar SDK

文本驱动数字人的js sdk。使用 TypeScript 实现，提供完整类型定义（`.d.ts`）。

## 安装

```bash
npm install @ririxin/talking-avatar-sdk
```

或直接使用打包后的单文件（无需构建工具）：

- **ESM**：`dist/talking-avatar-sdk.js`（配合 `import`）
- **IIFE**：`dist/talking-avatar-sdk.global.js`（`<script src="">`，全局 `TalkingAvatarSDK.TalkingAvatar`）

本地打包：`npm run build`。

## 使用方式

**npm / ESM 单文件：**

```html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Talking Avatar SDK Demo</title>
</head>
<body>
  <video id="video" autoplay muted></video>

  <script type="module">
    import { TalkingAvatar } from 'talking-avatar-sdk';
    // 或单文件： import { TalkingAvatar } from './dist/talking-avatar-sdk.js';

    const avatar = new TalkingAvatar({
      token: 'your-token',
      videoElement: document.getElementById('video'),
      onStatusChange: (status, text) => console.log('status', status, text),
      onMessage: (type, text) => console.log(type, text),
      onData: (msg) => console.log('raw', msg)
    });

    avatar.connect();
    avatar.sendText('你好');
    avatar.disconnect();
  </script>
</body>
</html>
```

**IIFE 单文件（无构建）：**

```html
<script src="./dist/talking-avatar-sdk.global.js"></script>
<script>
  const { TalkingAvatar } = TalkingAvatarSDK;
  const avatar = new TalkingAvatar({ token: '…', videoElement: document.querySelector('video'), onMessage: () => {} });
  avatar.connect('wss://…');
</script>
```

## TalkingAvatar 选项

| 选项 | 类型 | 说明 |
|------|------|------|
| `token` | string | 认证 Token，需要预先创建token，联系我们获取 |
| `wsUrl` | string | 可选，频道地址，也可在 `connect(url)` 时传入 |
| `whepUrl` | string | 可选，WHEP 拉流端点 URL |
| `videoElement` | HTMLVideoElement | 可选，渲染远程视频的DOM |
| `onStatusChange` | (status, text) => void | 连接状态变化回调：connecting / connected / disconnected |
| `onMessage` | (type, text) => void | 消息：system / sent / received |
| `onData` | (message) => void | 收到 JSON 时的原始对象 |
| `config` | object | 可选，覆盖 WS 默认 config 字段 |
| `iceServers` | array | 可选，ICE 服务器 |

## 方法

| 方法 | 说明 |
|------|------|
| `connect(wsUrl?)` | 发起连接 |
| `disconnect()` | 断开连接 |
| `sendText(text, final?)` | 发送对话文本（direct_drive） |
| `send(message)` | 发送任意 JSON 或字符串 |
| `setToken(token)` | 设置认证 Token |
| `setVideoElement(element)` | 设置视频元素 |
| `setWsUrl(url)` | 设置频道地址 |
| `setWhepUrl(url)` | 设置 WHEP 端点 |
| `setOnConnectError(callback)` | 连接失败时的回调 |
| `isConnected()` | 返回是否已连接 |
| `getThreadId()` | 返回当前 thread_id |
npm package: @ris/babel-preset-react
Description: ris babel config.
Author: beyondxgb@gmail.com
Latest version: 1.0.4

# @ris/preset-react

A preset for react application.

## Supported Browsers
By default, the generated project supports all modern browsers. Compatible with IE9.

## Supported Language Features
* [@babel/preset-env](https://babeljs.io/docs/en/next/babel-preset-env.html), compatible with IE9
* [@babel/preset-react](https://babeljs.io/docs/en/next/babel-preset-react),
* [@babel/plugin-proposal-decorators](https://babeljs.io/docs/en/babel-plugin-proposal-decorators)
* [@babel/plugin-proposal-class-properties](https://babeljs.io/docs/en/babel-plugin-proposal-class-properties)
* [@babel/plugin-proposal-object-rest-spread](https://babeljs.io/docs/en/babel-plugin-proposal-object-rest-spread)
* [@babel/plugin-syntax-dynamic-import](https://babeljs.io/docs/en/babel-plugin-syntax-dynamic-import)
npm package: @ris/cli
Description: ris command line.
Author: beyondxgb@gmail.com
Latest version: 1.0.5

# @ris/cli

Command tool for [RIS](https://github.com/risjs/ris).

RIS, React Integrated Solution. RIS's target is to provide a basic build solution that high scalability. Through this toolset we focus on output some best practice about react.

## Quick Start

```bash
npx create-ris ris-app
cd ris-app
npm start
```
> (npx comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))

## Features
- ✔︎ **Out of the box**, with empty application and standard application which built-in react, react-router, etc.
- ✔︎ **High scalability**, can highly customize your application and build configuration.
- ✔︎ **Ultimate development experience**, with dll to speed up build process, with tools to add component, pages quickly.
- ✔︎ **High performance**, code-splitting our app with [react-loadable](https://github.com/jamiebuilds/react-loadable).
- ✔︎ **Predictable state management**,built-in [xredux](https://github.com/beyondxgb/xredux) which well handle data flow problem.
- ✔︎ **Powerful data mock**, mock data in development conveniently.
npm package: @ris/dev-server
Description: ris dev server.
Author: beyondxgb@gmail.com
Latest version: 1.0.5

# @ris/dev-server

Dev Server for [RIS](https://github.com/risjs/ris). Base on [webpack-dev-server](https://github.com/webpack/webpack-dev-server).

## Usage

```bash
npm install --save-dev @ris/dev-server
```

```js
const risDevServer = require('@ris/dev-server');

risDevServer(options)
```

`options` is a plain object that contain:

* `webpackConfig`: webpack [configuration](https://webpack.js.org/configuration/)
* `serverConfig`: webpack server [configuration](https://webpack.js.org/configuration/dev-server/)
* `onCompileDone`: server compile done hook.
* `onCompileInvalid`: server compile invalid hook.


## Example

```js
const risDevServer = require('@ris/dev-server');

const webpackConfig = {
  entry: 'src/index.js',
};

const serverConfig = {
  port: 3000,
  compress: true,
  quiet: false,
  clientLogLevel: 'none',
  disableHostCheck: true,
};

risDevServer({
  webpackConfig,
  serverConfig,
  onCompileDone: () => {
    console.log('server is start and compile success!');
  },
});
```
npm package: @ris/eslint-config
Description: ris eslint config.
Author: beyondxgb@gmail.com
Latest version: 1.0.0

# @ris/esling-config

ESlint rules for [RIS](https://github.com/risjs/ris) with [ 'ES5', 'ES6', 'React' ] support. Based on [Airbnb](https://github.com/airbnb/javascript) JavaScript Style Guide.


## Usage

```bash
npm install --save-dev @ris/eslint-config
```

If you use some experimental features with Babel, you may also install [babel-eslint](https://github.com/babel/babel-eslint).


```bash
npm install --save-dev babel-eslint
```

### ES5 

```bash
{
  "extends": "@ris/eslint-config",
  "env": {
    "browser": true
  }
}
```

### ES6

```bash
{
  "extends": "@ris/eslint-config/es6",
  "env": {
    "browser": true
  }
}
```

### React

```bash
{
  "extends": "@ris/eslint-config/react",
  "env": {
    "browser": true
  }
}
```
npm package: @ris/mock
Description: ris mock middleware.
Author: beyondxgb@gmail.com
Latest version: 1.0.1

# @ris/mock

[![npm version](https://img.shields.io/npm/v/@ris/mock.svg?colorB=007ec6&style=flat-square)](https://www.npmjs.com/package/@ris/mock)
[![npm downloads](https://img.shields.io/npm/dm/@ris/mock.svg?style=flat-square)](https://www.npmjs.com/package/@ris/mock)

A light-weight mock tools for webpack server or standard express server.

## Getting Started

```
npm install @ris/mock --save-dev
```

In the `webpack.config.js`, we inject `@ris/mock` as a middleware in the `after` option.

```js
const mock = require('@ris/mock');

module.exports = {
  //...
  devServer: {
    compress: true,
    port: 9000,
    after: (app) => {
      // Start mock data
      mock(app);
    },
  }
};
```

In our project root folder, we create `mock` folder and `mock/rules.js` file.

`mock/rules.js` will like this:

```js

module.exports = {
  'GET /api/user': { name: 'beyondxgb' },
  'POST /api/form/create': { success: true },
  'GET /api/cases/list': (req, res) => { res.end(JSON.stringify([{ id: 1, name: 'demo' }])); },
  'GET /api/user/list': 'user/list.json',
  'GET /api/user/create': 'user/create.js',
};
```

When then browser send a request, for example, `GET /api/user`, if the rules you config in the `mock/rules.js` is matched, then it will directly response the data you config.

In the above rules, when browser send a request `GET /api/user`, then the server will response `{ name: 'beyondxgb' }` to the client.

## Config

`mock/rules.js` return a plain object. In the object, it is a `key/value` format.

```js
module.exports = {
  'GET /api/user': { name: 'beyondxgb' },
};
```

* `key`: it will like [**method**] [**api**]
* `value`: it can be **string**/**object**/**function**/**file**
  * **string/object**: 

  Directly config the response data.
  ```js
  module.exports = {
    'GET /api/user': 'beyondxgb',
    'GET /api/user': { name: 'beyondxgb' },
  }
  ```
  * **function**:

  You can control the response data flexibility through `req/res`.
  ```js
  module.exports = {
    'GET /api/user':  (req, res) => { res.end('beyondxgb'); }
  }
  ```

  * **file**:

  You can split the response data to file, only support `.js` and `.json`.
  
  ```js
  module.exports = {
    'GET /api/user':  'user/info.json'
    'GET /api/user/create':  'user/create.js'
  }
  ```

  Then you should create file `mock/user/info.json` and `mock/user/create.js`:

  `mock/user/info.json`:
  ```json
  {
    "name": "beyondxgb"
  }
  ```

  `mock/user/create.js`:
  ```js
  module.exports = (req, res) => {
    res.end('ok');
  };
  ```
npm package: @ris/webpack-config
Description: ris webpack config.
Author: beyondxgb@gmail.com
Latest version: 1.0.5

# @ris/webpack-config

Webpack config for [RIS](https://github.com/risjs/ris).

## Usage

```bash
npm install --save-dev @ris/webpack-config
```

```js
const risWebpackConfig = require('@ris/webpack-config');
const { webpackConfigDev, webpackConfigProd } = risWebpackConfig;
```
npm package: @risadams/gulp-wrapper
Description: A gulp plugin for wrapping files with custom strings. Access to filename is given through interpolation.
Author: Ris Adams
Latest version: 1.0.0

gulp-wrapper
============
[![Build Status](https://travis-ci.org/AntouanK/gulp-wrapper.png?branch=master)](https://travis-ci.org/AntouanK/gulp-wrapper) [![NPM version](https://badge.fury.io/js/gulp-wrapper.png)](http://badge.fury.io/js/gulp-wrapper)

> A [Gulp](https://github.com/wearefractal/gulp) plugin for wrapping files with custom strings.
Basically `gulp-header` & `gulp-footer` together.
With the addition that the filename is revealed to the user ( with ${filename} ).

##Usage
For example, on build I can wrap an HTML file with `<script>` template tags and specify the filename id. ( angular templates are a good use case )

sample template file

```
<div>
  <span>my template HTML is here</span>
</div>
```

so in my `gulpfile.js` I can do

```javascript

var gulp    = require('gulp'),
    wrapper = require('gulp-wrapper');

// ...
gulp.src('template.html')
    .pipe(wrapper({
       header: '<script type="text/ng-template" id="${filename}">\n',
       footer: '</script>\n'
    }))
    .pipe(gulp.dest('out'));
```

the result is :
```
<script type="text/ng-template" id="template.html">
<div>
  <span>my template HTML is here</span>
</div>
</script>
```


##API


####options.header
Type: `string` or `function`

The `string` you want to prepend to the file. The file name is available through interpolation `${filename}`

```javascript
//...
gulp.src('script/*.js')
    .pipe(wrapper({ header: '/* ${filename} MyCompany 2014 */'}))
```

A `function` that takes `file` as argument, and returns the string to be the header.
```javascript
//...
gulp.src('script/*.js')
    .pipe(wrapper({ header: function(file){ return '/* '+ file.path +' MyCompany 2014*/'; } }))
```

<br>
####options.footer
Type: `string` or `function`

The `string` you want to append to the file. The file name is available through interpolation `${filename}`

```javascript
//...
gulp.src('script/*.js')
	.pipe(wrapper({ footer: '/* ${filename} MyCompany 2014 */'}))
```
A `function` that takes `file` as argument, and returns the string to be the footer.
```javascript
//...
gulp.src('script/*.js')
    .pipe(wrapper({ footer: function(file){ return '/* '+ file.path +' MyCompany 2014*/'; } }))
```
npm package: @risadams/klog
Description: Utilities for formatting browser console messages
Author: Ris Adams
Latest version: 1.0.3

# klog
utility library for formatting JS console messages

![Node.js CI](https://github.com/risadams/klog/workflows/Node.js%20CI/badge.svg)

![Logo Image](https://github.com/risadams/klog/raw/master/img/klog-repository-open-graph-template.png)

## Usage

```javascript

todo...

```
npm package: @risadams/pride-flags
Description: Pure CSS Pride Flags
Author: Ris Adams
Latest version: 1.1.0

# CSS Pride Flags

![npm](https://img.shields.io/npm/v/@risadams/pride-flags)

## Install

This is a pure CSS library that can be included in your project to display LGBT+ pride flags as either large images, or small icons. It should be straightforward to install and use, and will be updated with new options and flags as they become available.

```sh
npm install @risadams/pride-flags
```

## Usage

```html
<head>
  <link rel="stylesheet" href="dist/pride-flags.min.css" />
</head>

<body>
  <div class="flag progress" role="img"></div>
  <div class="flag icon progress"></div>
</body>
```

## Flag Options

### Traditional/Historical Pride Flags

- ally-pride
- gilbert-baker
- intersex-inclusive
- new-pride
- philadelphia
- pink-triangle
- pride-1978
- pride-of-africa
- progress
- queer
- social-justice
- traditional

### Gender Identity Flags

- agender
- androgyne
- bigender
- demiboy
- demigender
- demigirl
- genderfluid
- genderflux
- genderqueer
- hijra
- metagender
- neutrois
- nonbinary
- pangender
- transgender
- unlabeled

### Sexual Orientation Flags

- abrosexual
- asexual
- bisexual
- demisexual
- gay-men
- graysexual
- lesbian
- omnisexual
- pansexual
- polysexual
- sapphic
- twink

### Romantic Orientation Flags

- aromantic
- demiromantic

### Relationship Structure Flags

- polyamory
- polyamorous-new

### Community/Cultural Flags

- bear-brotherhood
- drag
- intersex
- labrys
- leather
- puppy
- rubber
- trans-inclusive

### Spectrum Flags

- aromantic-spectrum
- asexual-spectrum

## Contribute

If you think this could be better, please [open an issue](https://github.com/risadams/pride-flags/issues/new)!

Please note that all interactions in this organization fall under our [Code of Conduct](CODE_OF_CONDUCT.md).

## License

[MIT](LICENSE) © 1996+ Ris Adams
npm package: @risan/ip-to-country
Description: Get country from IP address.
Author: Risan Bagja Pradana
Latest version: 1.0.3

# IP to Country

[![Build Status](https://badgen.net/travis/risan/ip-to-country)](https://travis-ci.org/risan/ip-to-country)
[![Test Covarage](https://badgen.net/codecov/c/github/risan/ip-to-country)](https://codecov.io/gh/risan/ip-to-country)
[![Greenkeeper](https://badges.greenkeeper.io/risan/ip-to-country.svg)](https://greenkeeper.io)
[![Latest Version](https://badgen.net/npm/v/@risan/ip-to-country)](https://www.npmjs.com/package/@risan/ip-to-country)

Get country from IP address using [MaxMind](https://www.maxmind.com) GeoLite2 binary database.

## Installation

```bash
$ npm install @risan/ip-to-country
```

## Usage

```js
const ipToCountry = require("@risan/ip-to-country");

(async () => {
  try {
    const result = await ipToCountry("123.45.6.7");

    if (result) {
      console.log(result);
    } else {
      console.log("IP address not found.");
    }
  } catch(error) {
    console.error(error.message);
  }
})();
```

## API

```js
ipToCountry(ip)
```

### Parameters

* `ip` (`String`): The IP address to lookup.

### Returns

It returns a `Promise` which when resolved contains `undefined` or an `Object`. `undefined` means the given IP address is not found in the database. Here's an example of the resolved country object:

```js
{
  code: "ID",
  name: "Indonesia",
  flag_emoji: "🇮🇩",
  geoname_id: 1643084,
  names: {
    de: "Indonesien",
    en: "Indonesia",
    es: "Indonesia",
    fr: "Indonésie",
    ja: "インドネシア共和国",
    "pt-BR": "Indonésia",
    ru: "Индонезия",
    "zh-CN": "印度尼西亚"
  },
  continent: {
    name: "Asia",
    code: "AS",
    geoname_id: 6255147,
    names: {
      de: "Asien",
      en: "Asia",
      es: "Asia",
      fr: "Asie",
      ja: "アジア",
      "pt-BR": "Ásia",
      ru: "Азия",
      "zh-CN": "亚洲"
    }
  }
}
```

* `code`: Two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
* `name`: The country name.
* `flag_emoji`: The country flag emoji.
* `geoname_id`: The [GeoNames](https://www.geonames.org) id.
* `names`: The country name in various language.
* `continent`: The continent data.

## License

[CC-BY-SA 4.0](https://github.com/risan/ip-to-country/blob/master/LICENSE.txt) · [Risan Bagja Pradana](https://bagja.net)

> This product includes GeoLite2 data created by MaxMind, available from
[https://www.maxmind.com](http://www.maxmind.com). GeoLite2 Database and Contents Copyright (c) 2018 MaxMind, Inc.

> The MaxMind GeoLite2 database incorporates [GeoNames](https://www.geonames.org) geographical data, which is made available under the [Creative Commons Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0/).
npm package: @risan/is-empty
Description: Check if a value is empty or not.
Author: Risan Bagja Pradana
Latest version: 1.0.5

# Is Empty

[![Build Status](https://badgen.net/travis/risan/is-empty)](https://travis-ci.org/risan/is-empty)
[![Test Covarage](https://badgen.net/codecov/c/github/risan/is-empty)](https://codecov.io/gh/risan/is-empty)
[![Greenkeeper](https://badges.greenkeeper.io/risan/is-empty.svg)](https://greenkeeper.io)
[![Latest Version](https://badgen.net/npm/v/@risan/is-empty)](https://www.npmjs.com/package/@risan/is-empty)

Check if a value is empty or not.

## Installation

```bash
$ npm install @risan/is-empty
```

### CDN

The library is available over a CDN:

```html
<script src="https://unpkg.com/@risan/is-empty@latest/dist/is-empty.umd.js"></script>

<!-- Or the minified version -->
<script src="https://unpkg.com/@risan/is-empty@latest/dist/is-empty.umd.min.js"></script>
```

## Usage

```js
const isEmpty = require("@risan/is-empty");

// The following statements will return TRUE:
isEmpty(null);
isEmpty(undefined);
isEmpty(NaN);

// An empty string is considered empty, return TRUE.
isEmpty("");
isEmpty(" ");
isEmpty("\n\t");

// An object with no properties is considered empty, return TRUE.
isEmpty({});
isEmpty(new Object());
isEmpty(Object.create(null));

// Array, Map, or Set with no items is considered empty, return TRUE.
isEmpty([]);
isEmpty(new Map());
isEmpty(new Set());

// The following statements will return FALSE:
isEmpty(true);
isEmpty(false);
isEmpty(0);
isEmpty(-123.5);
isEmpty(Infinity);
isEmpty([1, 2, 3]);
isEmpty({ foo: "bar" });
isEmpty(new Set([1, 2]));

const myMap = new Map();
myMap.set("foo", "bar");
isEmpty(myMap);

// Function will always return FALSE:
const myFunction = () => "foo";
isPlainObj(myFunction);
isEmpty(parseInt);

// Instance of class will always return FALSE:
class Person {}
isPlainObj(new Person());
isEmpty(new Date());
```

If you load the library directly on the browser, it's available under the `isEmpty` name.

```js
window.isEmpty(null); // TRUE
window.isEmpty("   "); // TRUE
window.isEmpty(false); // FALSE
window.isEmpty(new Date()); // FALSE
```

## License

[MIT](https://github.com/risan/is-empty/blob/master/LICENSE) © [Risan Bagja Pradana](https://bagja.net)
npm package: @risan/is-plain-obj
Description: Check if a value is a plain JavaScript object.
Author: Risan Bagja Pradana
Latest version: 1.0.7

# Is Plain Object

[![Build Status](https://badgen.net/travis/risan/is-plain-obj)](https://travis-ci.org/risan/is-plain-obj)
[![Test Covarage](https://badgen.net/codecov/c/github/risan/is-plain-obj)](https://codecov.io/gh/risan/is-plain-obj)
[![Greenkeeper](https://badges.greenkeeper.io/risan/is-plain-obj.svg)](https://greenkeeper.io)
[![Latest Version](https://badgen.net/npm/v/@risan/is-plain-obj)](https://www.npmjs.com/package/@risan/is-plain-obj)

Check if a value is a plain JavaScript object

## Installation

```bash
$ npm install @risan/is-plain-obj
```

### CDN

The library is available over a CDN:

```html
<script src="https://unpkg.com/@risan/is-plain-obj@latest/dist/is-plain-obj.umd.js"></script>

<!-- Or the minified version -->
<script src="https://unpkg.com/@risan/is-plain-obj@latest/dist/is-plain-obj.umd.min.js"></script>
```

## Usage

```js
const isPlainObj = require("@risan/is-plain-obj");

// The following statements will return TRUE:
isPlainObj({});
isPlainObj({ foo: "bar" });
isPlainObj(new Object());
isPlainObj(Object.create(null));
isPlainObj(Object.create({}));

// The following statements will return FALSE:
isPlainObj(undefined);
isPlainObj(null);
isPlainObj(true);
isPlainObj(3.14);
isPlainObj(NaN);
isPlainObj(Infinity);
isPlainObj("foo");
isPlainObj([1, 2, 3]);
isPlainObj(new Date());
isPlainObj(new Set([1, 2, 3]));
isPlainObj(new Map());
isPlainObj(new WeakMap());
isPlainObj(parseInt);

class Person {}
isPlainObj(new Person()); // FALSE

const myFunction = () => "foo";
isPlainObj(myFunction); // FALSE
```

If you load the library directly on the browser, it's available under the `isPlainObj` name.

```js
window.isPlainObj({ foo: "bar" }); // TRUE

window.isPlainObj(new Date()); // FALSE
```

## License

[MIT](https://github.com/risan/is-plain-obj/blob/master/LICENSE) © [Risan Bagja Pradana](https://bagja.net)