open-index/open-npm huggingface dataset:
npm package: @rqbazan/featflag
Description: A small and modern ReactJS library to use the feature toggling principle
Author: Ricardo Alexis Quiroz Bazan
Latest version: 1.2.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

<div align="center">
  <h1> 🚩 FeatFlag 🚩 </h1>
  <img width="500px" src="https://i.imgur.com/KPhrya3.jpg">
  <p>
    A small and modern ReactJS library to use
    <a href="https://martinfowler.com/articles/feature-toggles.html">
      the feature toggling principle
    </a>
  </p>
</div>

## 🌌 Installation 🌌

```sh
$ yarn add @rqbazan/featflag
```

or

```sh
$ npm install --save @rqbazan/featflag
```

## 🎉 Components and Hooks 🎉

### `<FlagProvider />`

Uses the `FlagContext.Provider` to easily pass down the features. Note, this should be always used in the root app file.

```js
import { FlagProvider } from '@rqbazan/featflag'
import App from './app'

// this should be come from an external service
const features = [
  'feature-a',
  'feature-b',
  'feature-c',
  ...
]

const Root = () => {
  return (
    <FlagProvider features={features}>
      <App />
    </FlagProvider>
  )
}
```

### `<Flag />`

Render its children if the feature name passed as prop is in the provided context.

```js
import { Flag } from '@rqbazan/featflag'

const AwesomeComponent = () => {
  return (
    <Flag featureName="some-feature-name">
      <h1>Hi there</h1>
    </Flag>
  )
}
```

Also support the render prop style

```js
import { Flag } from '@rqbazan/featflag'

const AwesomeComponent = () => {
  return (
    <Flag featureName="some-feature-name">
      {enabled => {
        return enabled ? <span>😉</span> : <span>🤔</span>
      }}
    </Flag>
  )
}
```

### `useFlag(featureName)`

Returns `true` if the feature name passed as argument is in the provided context. Otherwise, `false`.

```js
import { useFlag } from '@rqbazan/featflag'

const AwesomeComponent = () => {
  const hasThatFeature = useFlag('some-feature-name')

  return (
    <>
      <h1>My awesome app</h1>
      {hasThatFeature && <SomeComponent />}
    </>
  )
}
```

### `withFF(Component)`

Returns a wrapper component which receive `hasFeature` function as prop.

```js
import { withFF } from '@rqbazan/featflag'

const AwesomeComponent = props => {
  const { hasFeature } = props

  const hasThatFeature = hasFeature('some-feature-name')

  return (
    <>
      <h1>My awesome app</h1>
      {hasThatFeature && <SomeComponent />}
    </>
  )
}

export default withFF(AwesomeComponent)
```

## 🍕 LICENSE 🍕

MIT
npm package: @rqbazan/md-to-html
Description: [**unified**][unified] processor to parse and serialize Markdown to HTML. Powered by my favorite plugins.
Author: Ricardo Q. Bazan
Latest version: 1.0.2

# md-to-html

[**unified**][unified] processor to parse and serialize Markdown to HTML.
Powered by my favorite plugins.

[![npm version](https://badge.fury.io/js/%40rqbazan%2Fmd-to-html.svg)](https://badge.fury.io/js/%40rqbazan%2Fmd-to-html)

## Install

```sh
> yarn add @rqbazan/md-to-html
```

## Usage

Say we have the following file, `doc.md`

```md
---
title: This personal site
date: 2020-12-25
author: Santiago Q. Bazan
---

# Sample note :tada:

Here's a quick _sample note_
```

And our script, `index.js`, looks as follows:

```js
import path from 'path'
import fs from 'fs'
import mdToHtml from '@rqbazan/md-to-html'

function main() {
  const pathfile = path.join(__dirname, 'doc.md')
  const doc = fs.readFileSync(pathfile)
  const vfile = mdToHtml.processSync(doc)

  console.log(vfile.data) // yaml metadata
  console.log(vfile.toString()) // html
}

main()
```

Now, running `node index.js` yields:

```text
λ node index.js
{
  title: 'This personal site',
  date: '2020-12-25',
  author: 'Santiago Q. Bazan'
}
<h1>Sample note <img class="emoji" draggable="false" alt="🎉" src="https://twemoji.maxcdn.com/v/13.0.1/72x72/1f389.png" title="🎉"/></h1>
<p>Here's a quick <em>sample note</em></p>
```

Here is the generated HTML:

```html
<h1>
  Sample note
  <img
    class="emoji"
    draggable="false"
    alt="🎉"
    src="https://twemoji.maxcdn.com/v/13.0.1/72x72/1f389.png"
    title="🎉"
  />
</h1>
<p>Here's a quick <em>sample note</em></p>
```

## Plugins

- [remark-parse](https://www.npmjs.org/package/remark-parse)
- [remark-frontmatter](https://www.npmjs.org/package/remark-frontmatter)
- [remark-extract-frontmatter](https://www.npmjs.org/package/remark-extract-frontmatter)
- [remark-gemoji](https://www.npmjs.org/package/remark-gemoji)
- [remark-twemoji](https://www.npmjs.org/package/remark-twemoji)
- [remark-html](https://www.npmjs.org/package/remark-html)

## License

[MIT][license] © [Ricardo Q. Bazan][author]

<!-- Definitions -->

[unified]: https://github.com/unifiedjs/unified
[author]: https://sxntixgo.codes
[license]: https://github.com/rqbazan/md-to-html/blob/main/LICENSE
npm package: @rqbazan/set-initial-color-mode
Description: ## Inspiration
Author: Ricardo Q. Bazan
Latest version: 1.3.0

# Set Initial Color Mode 🌗

## Inspiration

[The Quest for the Perfect Dark Mode](https://www.joshwcomeau.com/react/dark-mode/) by [Josh Comeau](https://twitter.com/JoshWComeau)

## Usage

### Plain HTML

```html
<script src="https://unpkg.com/@rqbazan/set-initial-color-mode/dist/browser.js" />
```

### Next.js

```jsx
import NextDocument, { Head, Html, Main, NextScript } from "next/document";
import { getJsText } from "@rqbazan/set-initial-color-mode";

export default class Document extends NextDocument {
  render() {
    return (
      <Html lang="en">
        <Head>
          <script
            id="set-initial-color-mode"
            dangerouslySetInnerHTML={{ __html: getJsText() }}
          />
        </Head>
        <body>
          <Main />
          <NextScript />
        </body>
      </Html>
    );
  }
}
```

### React.js

```jsx
import * as React from "react";
import { useColorModeToggle } from "@rqbazan/set-initial-color-mode";

function Switch() {
  const { onToggle } = useColorModeToggle();

  return <input type="checkbox" onClick={onToggle} />;
}
```
npm package: @rqbazan/vite-plugin-shim-react-pdf
Description: A shim that allows React PDF to be used with Vite
Author: Kevin Brown
Latest version: 1.1.0

# vite-plugin-shim-react-pdf

Adds necessary shims so that React PDF can be used with Vite.

## Usage

```console
$ yarn add @react-pdf/renderer
$ yarn add --dev @rqbazan/vite-plugin-shim-react-pdf
```

Then in `vite.config.js`:

```javascript
import { defineConfig } from "vite";
import reactRefresh from "@vitejs/plugin-react-refresh";
import shimReactPdf from "@rqbazan/vite-plugin-shim-react-pdf";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [reactRefresh(), shimReactPdf()],
});
```

Both `yarn dev` and `yarn build` should now work correctly in your Vite project.
npm package: @rqbik/mtext
Description: Parse minecraft text to JSON format
Author: rqbik
Latest version: 1.0.7

# `@rqbik/mtext`

Parse minecraft text to JSON format.\
Supports all color and style codes, including the hex color format.

```typescript
import { MinecraftText } from '@rqbik/mtext';

const text = MinecraftText.from('Regular text &cRed text!');
```
npm package: @rqjs-napi/rqjs-linux-x64-musl
Description: A cross-platform command line utility to watch file system changes.
Latest version: 0.1.2

# `@rqjs-napi/rqjs-linux-x64-musl`

This is the **x86_64-unknown-linux-musl** binary for `@rqjs-napi/rqjs`
npm package: @rqjs-napi/rqjs-win32-x64-msvc
Description: A cross-platform command line utility to watch file system changes.
Latest version: 0.1.2

# `@rqjs-napi/rqjs-win32-x64-msvc`

This is the **x86_64-pc-windows-msvc** binary for `@rqjs-napi/rqjs`
npm package: @rqjs/rqcomponents
Description: A Component Library for Ricequant.
Latest version: 1.0.16

# RQCOMPONENTS

> ricequant common vue componenets

## Release

master: https://www.npmjs.com/package/@rqjs/rqcomponents

## Import

### Full Import（NOT RECOMMANDED）

```js
import UI from "@rqjs/rqcomponents";
import "@rqjs/rqcomponents/lib/theme/index.css";
import "@rqjs/rqcomponents/lib/theme/base";
import "@rqjs/rqcomponents/lib/theme/base.css";
```

### Partial Import

rqcomponent only exports esm packages.

```js
import RqHeader from "@rqjs/rqcomponents/lib/[rq-component-name]";
// Or import all components and deconstruction.
// import { RqHeader } from "@rqjs/rqcomponents";

import "@rqjs/rqcomponents/lib/theme/[rq-component-name].css";
import "@rqjs/rqcomponents/lib/theme/base";
import "@rqjs/rqcomponents/lib/theme/base.css";
```

## Registration

### Global Registration

```js
import RqHeader from "@rqjs/rqcomponents/lib/[rq-component-name]";

Vue.use(RqHeader);

new Vue({
  el: "#rq-header",
  render: (h) => h(RqHeader),
});
```

### Local Registration

```js
import RqHeader from "@rqjs/rqcomponents/lib/[rq-component-name]";

new Vue({
  el: "#rq-header",
  components: { RqHeader },
  render: (h) => h(RqHeader),
});
```

## [Components Description Link](./COMPONENTS_DOC.md)

## Developer

### Commands

```bash
npm run start: preview components, need configure `nginx.sample.conf`,visit http://<host>/rqcomponents

npm run dev : generating publish files use watch mode

npm run build : generating publish files

npm run lint : audit code style

npm run clean : clear demo cache
```

### Contributions

1. [`git 规范`](http://wiki.ricequant.com/pages/viewpage.action?pageId=17269198)

2. [`lint 规范`](http://wiki.ricequant.com/pages/viewpage.action?pageId=45875427)

3. [`npm 规范`](http://wiki.ricequant.com/pages/viewpage.action?pageId=52232790)

4. [`icon 规范`](http://wiki.ricequant.com/pages/viewpage.action?pageId=19562729)

5. please keep sync `COMPONENTS_DOC.md` and `demo/App.vue` with `packages/<package-name>/`
npm package: @rqjs/rqthemes
Description: ricequant themes
Latest version: 2.0.7

# RQTHEMES

> ricequant common themes

## Release

https://www.npmjs.com/package/@rqjs/rqthemes

## Goal

unify mutiple products theme, **product projects using variables defined in src/vars(lib/vars)**

## Usage

1. import one of element-ui themes or both of them

- element light theme: `import '@rqjs/rqthemes/lib/element-light.css'`
- element dark theme: `import '@rqjs/rqthemes/lib/element-dark.css'`

2. import all vars

- `import '@rqjs/rqthemes/lib/vars.css'`

3. import entry file, which contains global style,and highcharts theme(styled mode)

- `import '@rqjs/rqthemes'`
- please use `import @rqjs/rqthemes/lib/legacy.css` instead if project need support IE
- _postcss IE polyfill could fetch light vars from `@rqjs/rqthemes/lib/light.json`_

## Caveats

- **IE support light theme only**
- **highcharts reqiure v7.0.0+, using styled mode**

## Developer

### Commands

```bash
npm run start : preview element-ui themes,visit http://localhost:1234

npm run build : generating publish files

npm run lint : audit code style

npm run clean : clear demo cache
```

### Contributions

1. color vars in theme files is **maintained by designer**.

2. [`git 规范`](http://wiki.ricequant.com/pages/viewpage.action?pageId=17269198)

3. [`lint 规范`](http://wiki.ricequant.com/pages/viewpage.action?pageId=45875427)

4. [`npm 规范`](http://wiki.ricequant.com/pages/viewpage.action?pageId=52232790)

5. files structure description  
   ![structure](rqthemes.png)
npm package: @rql/eslint-plugin
Description: Description
Author: Frank Bessou
Latest version: 0.1.0

# eslint-plugin-rql

Eslint plugin which provides lint rules for *RQL* queries

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ npm i eslint --save-dev
```

Next, install `@rql/eslint-plugin`:

```
$ npm install @rql/eslint-plugin --save-dev
```


## Usage

Add `rql` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
    "plugins": [
        "@rql"
    ]
}
```


Then configure the rules you want to use under the rules section.

```json
{
    "rules": {
        "@rql/rule-name": 2
    }
}
```

## Supported Rules


| Name                                                         | Description                                                                       |
| -------------------------------------------------------------| --------------------------------------------------------------------------------- |
| [`@rql/no-undeclared-var`](./docs/rules/no-undeclared-var.md)| Require selected variables to appear in the restriction part of search queries.   |
npm package: @rql/parser
Description: > A Rql parser
Latest version: 0.1.0

# @rql/parser
> A Rql parser

## Install

This package is not published yet.

## Scripts

- `yarn build` compile typescript files to .js files and emit type declarations
- `yarn watch` run compilation whenever a file changes

## Example usage

In the web console or in a node-js interpreter you can type:

```typescript
import {parse} from "@rql/parser"
const ast = parse("Any X WHERE X is Person");
console.log(ast);
```

It should output the following JSON:

```json
{
  "kind": "SearchQuery",
  "selection": [
    {
      "kind": "Variable",
      "identifier": {
        "kind": "Identifier",
        "name": "X"
      }
    }
  ],
  "restrictions": [
    {
      "kind": "TripletRestriction",
      "subject": {
        "kind": "Variable",
        "identifier": {
          "kind": "Identifier",
          "name": "X"
        }
      },
      "relation": {
        "kind": "Identifier",
        "name": "is"
      },
      "object": {
        "kind": "Identifier",
        "name": "Person"
      }
    }
  ]
}
```
npm package: @rqrqrqrq/react-scripts
Description: Configuration and scripts for Create React App.
Latest version: 666.0.0

# react-scripts

This package includes scripts and configuration used by [Create React App](https://github.com/facebook/create-react-app).<br>
Please refer to its documentation:

- [Getting Started](https://facebook.github.io/create-react-app/docs/getting-started) – How to create a new app.
- [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.
npm package: @rqsts/react-core
Description: Core components of @rqsts/react-app, a frontend Framework for building admin applications on top of REST services, using ES6, React
Latest version: 1.0.20

# @rqsts/react-core

Core components of [@rqsts/react-app](https://www.requests.com.br/@rqsts-react-app/), 
a frontend Framework for building admin applications on top of REST/GraphQL services, using ES6, React.
This package does not include any UI components. We also provide a default UI in the `@rqsts/react-materialui` package.

## License

@rqsts/react-app is licensed under the [MIT License](https://www.requests.com.br/@rqsts-react-app/LICENSE.md), 
sponsored and supported by [requests](https://www.requests.com.br/).
npm package: @rqsts/react-input-rich-text
Description: <RichTextInput> component for @rqsts/react-app, useful for editing HTML code in admin GUIs.
Author: Felipe Moura
Latest version: 1.0.20

# `<RichTextInput>` for @rqsts/react-app

For editing HTML with [@rqsts/react-app](https://github.com/marmelab/@rqsts/react-app), use the `<RichTextInput>` component. It embarks [quill](http://quilljs.com/), a popular cross-platform Rich Text Editor.

![`<RichTextInput>` example](http://marmelab.com/admin-on-rest/img/rich-text-input.png)

## Installation

```sh
npm install rqsts-input-rich-text --save-dev
```

## Usage

```js
import React from 'react';
import {
    DateInput,
    Edit,
    EditButton,
    LongTextInput,
    TextInput,
} from '@rqsts/react-app';
import RichTextInput from '@rqsts/react-input-rich-text';

const PostTitle = ({ record }) => {
    return <span>Post {record ? `"${record.title}"` : ''}</span>;
};

export const PostEdit = (props) => (
    <Edit title={<PostTitle />} {...props}>
        <DisabledInput label="Id" source="id" />
        <TextInput source="title" validation={{ required: true }} />
        <LongTextInput source="teaser" validation={{ required: true }} />
        <RichTextInput source="body" validation={{ required: true }} />
        <DateInput label="Publication date" source="published_at" />
    </Edit>
);
```

You can customize the rich text editor toolbar using the `toolbar` attribute, as described on the [Quill official toolbar documentation](https://quilljs.com/docs/modules/toolbar/).

```js
<RichTextInput source="body" toolbar={[ ['bold', 'italic', 'underline', 'link'] ]} />
```

## License

This library is licensed under the MIT License, and sponsored by [marmelab](http://marmelab.com).
npm package: @rqsts/react-language-english
Description: English messages for @rqsts/react-app, the frontend framework for building admin applications on top of REST/GraphQL services
Author: Felipe Moura
Latest version: 1.0.20

# English Messages for @RQSTS/React-App

English messages for [@rqsts/react-app](https://github.com/felipewom/react-core), 
the frontend framework for building admin applications on top of REST/GraphQL services.

## Installation

```sh
npm install --save @rqsts/react-language-english
```

## Usage

```js
import englishMessages from '@rqsts/react-language-english';

const messages = {
    'en': englishMessages,
};
const i18nProvider = locale => messages[locale];

<Admin locale="en" i18nProvider={i18nProvider}>
  ...
</Admin>
```

## License

This translation is licensed under the MIT License, and sponsored by
 [@rqsts/react-app](http://www.requests.com.br).
npm package: @rqsts/react-language-french
Description: French messages for @rqsts/react-app, the frontend framework for building admin applications on top of REST/GraphQL services
Author: Felipe Moura
Latest version: 1.0.20

# French  Messages for @RQSTS/React-App

French messages for [@rqsts/react-app](https://github.com/felipewom/react-core), 
the frontend framework for building admin applications on top of REST/GraphQL services.

## Installation

```sh
npm install --save @rqsts/react-language-english
```

## Usage

```js
import frenchMessages from '@rqsts/react-language-french';

const messages = {
    'fr': frenchMessages,
};
const i18nProvider = locale => messages[locale];

<Admin locale="fr" i18nProvider={i18nProvider}>
  ...
</Admin>
```

## License

This translation is licensed under the MIT License, and sponsored by [@rqsts/react-app](http://www.requests.com).
npm package: @rqsts/react-materialui
Description: UI Components for @rqsts/react-app with MaterialUI
Latest version: 1.0.20

# @rqsts/react-material

UI Components for [@rqsts/react-app](https://www.requests.com.br/@rqsts-react-app/) with [MaterialUI](https://material-ui.com/).

## License

Rquests React App is licensed under the [MIT License](https://www.requests.com.br/@rqsts-react-app/LICENSE.md), sponsored and supported by [requests](http://www.requests.com.br).
npm package: @rqsts/react-tree-language-english
Description: English messages for @rqsts/react-tree-core, an addon providing tree components for @rqsts/react-app, the frontend framework for building admin applications on top of REST/GraphQL services
Author: Felipe Moura
Latest version: 1.0.20

# English Messages for rqsts-react-tree

English messages for `rqsts-react-tree`, an addon providing tree components for [@rqsts/react-app](https://github.com/marmelab/@rqsts/react-app), the frontend framework for building admin applications on top of REST/GraphQL services.

## Installation

```sh
npm install --save rqsts-react-language-english rqsts-react-tree-language-english
```

## Usage

```js
import englishMessages from '@rqsts/react-language-english';
import treeEnglishMessages from '@rqsts/react-tree-language-english';
import { mergeTranslations } from '@rqsts/react-app';

const messages = {
    'en': mergeTranslations(englishMessages, treeEnglishMessages),
};

<Admin locale="en" messages={messages}>
  ...
</Admin>
```

## License

This translation is licensed under the MIT License, and sponsored by [marmelab](http://marmelab.com).
npm package: @rqsts/react-tree-language-french
Description: French messages for @rqsts/react-tree, an addon providing tree components for @rqsts/react-app, the frontend framework for building admin applications on top of REST/GraphQL services
Author: Felipe Moura
Latest version: 1.0.20

# French Messages for rqsts-react-tree

French messages for `rqsts-react-tree`, an addon providing tree components for [@rqsts/react-app](https://github.com/marmelab/@rqsts/react-app), the frontend framework for building admin applications on top of REST/GraphQL services.

## Installation

```sh
npm install --save rqsts-react-language-french rqsts-react-tree-language-french
```

## Usage

```js
import englishMessages from '@rqsts/react-language-french';
import treeFrenchMessages from '@rqsts/react-tree-language-french';
import { mergeTranslations } from '@rqsts/react-app';

const messages = {
    'fr': mergeTranslations(frenchMessages, treeFrenchMessages),
};

<Admin locale="fr" messages={messages}>
  ...
</Admin>
```

## License

This translation is licensed under the MIT License, and sponsored by [marmelab](http://marmelab.com).
npm package: @rqt/github
Description: A GitHub API implementation.
Author: Anton
Latest version: 1.3.1

# @rqt/github

[![npm version](https://badge.fury.io/js/%40rqt%2Fgithub.svg)](https://www.npmjs.com/package/@rqt/github)

`@rqt/github` is a _GitHub API_ implementation in _Node.JS_.

```sh
yarn add @rqt/github
```

<kbd>📙 [Read all API documentation in Wiki](../../wiki)</kbd>

## Table Of Contents

- [Table Of Contents](#table-of-contents)
- [API](#api)
- [`constructor(token?: string): GitHub`](#constructortoken-string-github)
- [Copyright](#copyright)

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/0.svg?sanitize=true">
</a></p>

## API

The package is available by importing its default function:

```js
import GitHub from '@rqt/github'
```

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/1.svg?sanitize=true">
</a></p>

## <code><ins>constructor</ins>(</code><sub><br/>&nbsp;&nbsp;`token?: string,`<br/></sub><code>): <i>GitHub</i></code>

Create a new instance of a GitHub API client. If the token is given, it will be used for methods that require it.

```js
/* yarn example/ */
import GitHub from '@rqt/github'
import bosom from 'bosom'

(async () => {
  try {
    const token = await bosom('.token.json')
    const name = 'github-example'
    const org = 'rqt'

    const github = new GitHub(token)
    const repo = await github.repos.create({
      name,
      org,
      homepage: 'https://rqt.biz',
      license_template: 'mit',
      description: 'An example repository.',
      auto_init: true,
      gitignore_template: 'Node',
    })
    console.log('Created a repository at: %s', repo.html_url)

    await github.activity.star(org, name)
    console.log('Starred a repository')
    await github.repos.delete(org, name)
    console.log('Deleted a repository')
  } catch ({ message }) {
    console.log(message)
  }
})()
```
```
Created a repository at: https://github.com/rqt/github-example
Starred a repository
Deleted a repository
```

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/2.svg?sanitize=true">
</a></p>



## Copyright

Documentation descriptions by _GitHub_.

<table>
  <tr>
    <th>
      <a href="https://artd.eco">
        <img width="100" src="https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png"
          alt="Art Deco">
      </a>
    </th>
    <th>© <a href="https://artd.eco">Art Deco</a> for <a>Rqt</a> 2019</th>
    <th>
      <a href="https://www.technation.sucks" title="Tech Nation Visa">
        <img width="100" src="https://raw.githubusercontent.com/idiocc/cookies/master/wiki/arch4.jpg"
          alt="Tech Nation Visa">
      </a>
    </th>
    <th><a href="https://www.technation.sucks">Tech Nation Visa Sucks</a></th>
  </tr>
</table>

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/-1.svg?sanitize=true">
</a></p>
npm package: @rqt/ip
Description: Returns a public IP address of the host.
Author: Anton
Latest version: 1.2.2

# @rqt/ip

[![npm version](https://badge.fury.io/js/%40rqt%2Fip.svg)](https://npmjs.org/package/@rqt/ip)

`@rqt/ip` Returns a public IP address of the host.

```sh
yarn add @rqt/ip
```

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/0.svg?sanitize=true">
</a></p>

## Table Of Contents

- [Table Of Contents](#table-of-contents)
- [API](#api)
- [`async ip(options?: Options): string`](#async-ipoptions-options-string)
  * [`_rqt.IpOptions`](#type-_rqtipoptions)
- [Copyright](#copyright)

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/1.svg?sanitize=true">
</a></p>

## API

The package is available by importing its default function:

```js
import ip from '@rqt/ip'
```

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/2.svg?sanitize=true">
</a></p>

## `async ip(`<br/>&nbsp;&nbsp;`options?: Options,`<br/>`): string`

Returns the IP address as seen by an external web-server.

<strong><a name="type-_rqtipoptions">`_rqt.IpOptions`</a></strong>: Options for the request.
<table>
 <thead><tr>
  <th>Name</th>
  <th>Type &amp; Description</th>
  <th>Default</th>
 </tr></thead>
 <tr>
  <td rowSpan="3" align="center">host</td>
  <td><em>string</em></td>
  <td rowSpan="3"><code>https://api.ipify.org</code></td>
 </tr>
 <tr></tr>
 <tr>
  <td>The address from which to get the IP address.</td>
 </tr>
</table>

```js
const GetIp = async (host) => {
  const res = await ip({ host })
  return res
}
```
```
127.0.0.1
```

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/3.svg?sanitize=true">
</a></p>

## Copyright

<table>
  <tr>
    <th>
      <a href="https://artd.eco">
        <img width="100" src="https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png"
          alt="Art Deco">
      </a>
    </th>
    <th>© <a href="https://artd.eco">Art Deco</a> for <a href="https://rqt.biz">Rqt</a> 2019</th>
    <th>
      <a href="https://www.technation.sucks" title="Tech Nation Visa">
        <img width="100" src="https://raw.githubusercontent.com/idiocc/cookies/master/wiki/arch4.jpg"
          alt="Tech Nation Visa">
      </a>
    </th>
    <th><a href="https://www.technation.sucks">Tech Nation Visa Sucks</a></th>
  </tr>
</table>

<p align="center"><a href="#table-of-contents">
  <img src="/.documentary/section-breaks/-1.svg?sanitize=true">
</a></p>
npm package: @rquanx/utils
Description: Opinionated collection of common JavaScript / TypeScript utils by @rquanx
Author: rquanx
Latest version: 1.0.1

# @rquanx/utils

[![NPM version](https://img.shields.io/npm/v/@rquanx/utils?color=a1b858&label=)](https://www.npmjs.com/package/@rquanx/utils)

Opinionated collection of common JavaScript / TypeScript utils by [@rquanx](https://github.com/rquanx).

- Tree-shakable ESM
- Fully typed - with TSDocs

inspired by [antfu/utils](https://github.com/antfu/utils)
npm package: @rr0/case
Description: RR0 Case API
Author: Jérôme Beau
Latest version: 0.1.3

# RR0 Case API

This API allows to fetch case records from a RR0 server.

## Setup

```shell
npm install
```

## Usage

```js
import { RR0Catalog } from "@rr0/case"

const catalog = new RR0Catalog()
await catalog.init()

/** @type RR0Case */
const roswellCase = catalog.casesFiles.find(url => url.includes("/Roswell/"))
const firstCase = await catalog.fetchCase(roswellCase)
assert.equal(firstCase.title, "Roswell")

const mantellPeople = catalog.peopleFiles.find(url => url.includes("/MantellThomas/"))
const firstPeople = await catalog.fetchPeople(mantellPeople)
assert.equal(firstPeople.title, "Mantell, Thomas Francis")
```

## Build

```shell
npm run build
```

## Test

```shell
npm run test
```

## Deployment

Increase the version number in [`package.json`](package.json), then:

```shell
npm publish
```

will build & test then publish a new version of the package.
npm package: @rr0/cms
Description: RR0 Content Management System (CMS)
Author: Jérôme Beau
Latest version: 0.3.56

# RR0 CMS

This is the Content Management System (CMS) used to build the [RR0 website](https://rr0.org).

It allows to produce a similar website, but with the data of your choice.

It relies on [ssg-api](https://www.npmjs.com/package/ssg-api) to generate the web pages.

While it is especially designed to render UFO-related data as it was designed to render the  [RR0 website](https://rr0.org),
it can also probably be used to generate websites pertaining to other topics, as most of the data types (time, place, event, sources, notes, etc.) are not specific to the ufological domain. 

```mermaid
classDiagram
    class cms {
        build()
    }
    cms --> common
    cms --> lang
    cms --> time
    cms --> place
    cms --> org
    cms --> ssg-api
    cms --> data
```

- [Data types](https://github.com/RR0/data?tab=readme-ov-file#rr0data)
npm package: @rr0/common
Description: Common and utility classes
Author: Jérôme Beau
Latest version: 1.1.4

# @rr0/common

[![RR0](https://circleci.com/gh/RR0/common.svg?style=svg)](https://app.circleci.com/pipelines/github/RR0/common)

A **typed** library for common and utility tasks.

## Installation

```
npm install @rr0/common --save
```

## API

### User preferences
`UserPreferences` defines a type which requires a `locale` property.

### Key-value type
`KeyValue<T>` defines a type whole all fields are of type `T`.

### Object utilities
- `ObjectUtils.isUndefined(val)` checks if `val` is strictly `undefined`.
- `ObjectUtils.isDefined(val)` checks if `val` is strictly anything but `undefined`.
- `ObjectUtils.isUnset(val)` checks if `val` is strictly `undefined` or `null`.
- `ObjectUtils.isSet(val)` checks if `val` is strictly anything but `undefined` nor `null`.
- `ObjectUtils.asSet(val, errMsg?)` returns val as defined. If it was not, an AssertionError(errMsg) will be thrown.

### String utilities
- `StringUtils.toString(val)` returns a string representation of `val`, enclosed in quotes if `val` is a `string`.

### Gender
`Gender` is an enumeration to qualify things' gender.
npm package: @rr0/data
Description: RR0 data model
Author: Jérôme Beau
Latest version: 0.3.40

# @rr0/data

All RR0 data types share common properties from their `RR0Data` interface.

Also, all RR0Data have other RR0Data types as properties, such as:

- [place](https://github.com/RR0/place)
- people
- [events](src/event/README.md)

```mermaid
classDiagram
    class RR0Data {
        id: string
        type: string
        title: string
        name: string
        time: TimeContext
        dirName: string
        url?: string
    }
    RR0Data --> Place: place?
    RR0Data --> People: people?
    RR0Data --> RR0Data: events[]
    class Sighting {
    }
    RR0Data <|-- Sighting
    class People {
    }
    RR0Data <|-- People
    class Organization {
    }
    RR0Data <|-- Organization
    class Place {
    }
    RR0Data <|-- Place
    class Case {
    }
    RR0Data <|-- Case
    class Source {
    }
    RR0Data <|-- Source
    class Investigation {
    }
    RR0Data <|-- Investigation
```
npm package: @rr0/lang
Description: Language and translation
Author: Jérôme Beau
Latest version: 0.1.12

# @rr0/lang

[![RR0](https://circleci.com/gh/RR0/lang.svg?style=svg)](https://app.circleci.com/pipelines/github/RR0/lang)

A **typed**, no-dependency language and translation lib.

- Support for standard template literals as placeholders in messages, with plural support.
- Translations implement _interfaces_, so:
    - you cannot use a incorrect message, since the compiler allows only declared message keys.
    - you cannot forget a translation, since all the compiler will enforce you to implement it.

## Installation

Add `@rr0/lang` as a dependency to your project:

```
npm install @rr0/lang --save
```

so that you can

```
import * from "@rr0/lang"
```

in your code.

## Usage

1. Create a common interface for your messages in every language. :\
   `interface MyMessages extends KeyValue { hello: string; bye: string; }`
   }`
2. Create implementations of this interface with translations values:\
   `class MyFrenchMessages implements MyMessages { hello = "Bonjour ${name}"; bye = "Au revoir"}`
3. Create a Translator with a given target language and grammar: \
   `frTranslator = new Translator("fr", grammar_fr)`
4. Translate a message: `bonjour = frTranslator.translate(myFrMessages.hello, {name: "Jérôme"})`

### Plural support

You can use `${var:plural}` variant in a placeholder to force plural. The translator will then use the provided grammar
rules to render the message.

### Translations

By default, messages and translators are separated, but you can use a `Translation`, which is a `Translator` that holds
its messages.

## Example

Say we want to translate some message in two locales:

```ts
import {Translator, grammar_en, grammar_fr} from '@rr0/lang'

// #1
interface MyMessages extends KeyValue {
  key1: string
}

// #2
class EnglishMessages implements MyMessages {
  key1 = 'several ${param1:plural} and ${param2:plural} but one single ${param1} and ${param2}'
}
class FrenchMessages implements MyMessages {
  key1 = 'plusieurs ${param1:plural} et ${param2:plural} mais un seul ${param1} et ${param2}'
}

// #3
const messages_en = new EnglishMessages()
const translator_en = new Translator('en', grammar_en)

const messages_fr = new FrenchMessages()
const translator_fr = new Translator('fr', grammar_fr)

// #4
const translated_en = translator_en.translate(messages_en.key1, {
  param1: 'thing',
  param2: 'party'
})
// translated_en = "several things and parties but one single thing and party"

const translated_fr = translator_fr.translate(messages_fr.key1, {
  param1: 'cigare',
  param2: 'cheval'
})

// translated_fr = "plusieurs cigares et chevaux mais un seul cigare et cheval"
```
A `Translation` is a `Translator` that holds its messages. For instance:
```js
const messages = { dict: { key: 'value is ${param}' } }
const translation = new Translation('fr', grammar_fr, messages)
translation.add('newKey', 'new value is ${param}')
const translated = translation.translate(translation.messages.dict['newKey'], { param: 'paramValue' })
// translated = "new value is paramValue"
```
npm package: @rr0/place
Description: Place representation API
Author: Jérôme Beau
Latest version: 0.5.3

# @rr0/place

[![RR0](https://circleci.com/gh/RR0/place.svg?style=svg)](https://app.circleci.com/pipelines/github/RR0/place)

Places representation API.

## Installation

```
npm install @rr0/place --save
```

## Design

Once place are represented using assembled business objects
(`City`, `State`, `Country`, or several `Place` subtypes), they can be provided as parameters to some `Renderer`, which
will use a `Translator` to convert them to text (or HTML markup, etc.).

## Example

Say we want to render the timeline of some people:

```js
import {grammar_fr, Translation} from "@rr0/lang"
import {messages_fr} from "lang/Messages_fr"
import {City, States, HTMLPlaceRenderer} from '@rr0/place';

const translation = new Translation('fr', grammar_fr, messages_fr)
const renderer = new HTMLPlaceRenderer(translation)
const city = new City('Chicago', States.illinois)
const html = renderer.renderCity(city)
```

will return in `html`:

```html
Chicago (Illinois, États-Unis)
```

Change the parameters of the `Translator` to a `en` locale and to use
`messages_en`, and `grammar_en` and change the custom translation to:

then you will get instead:

```html
Chicago (Illinois, USA)
```
npm package: @rrainpath/ts-utils
Description: Utility TypeScript functions & types
Author: 'rRain'
Latest version: 0.1.1

# @rrainpath/ts-utils
Utility TypeScript functions &amp; types.
Contains: inRange, StringBuilder, isEmpty, nonEmpty


## Install
`npm i @rrain/ts-utils`


## Usage

`inRange(minValue, maxValue, currentValue)`
makes `currentValue` to be in range [`minValue`, `maxValue`]

```
let a
let r
a = 50
r = inRange(0,100,a) // => 50
r = inRange(50,50,a) // => 50
r = inRange(70,100,a) // => 70
r = inRange(49,49.999,a) // => 49.999
```

`isEmpty(object)` checks if `object` is `null` or `undefined`

`nonEmpty(object)` checks if `object !== null && !== undefined`

`StringBuilder` let you easy way to modify `string`

```
let sb = new StringBuilder('some string')
let s = sb.replace(0,4,'awesome').replaceLen(8,1,'S').append("Builder").toString() // => awesome StringBuilder
```

StringBuilder methods:

`set(str?: string | null | undefined): void` equlas to new StringBuilder(str)

`first(str: string): this` insert to start

`append(str: string): this`

`insert(idx: number, str: string): this`

`remove(s: number, e?: number): this`

`removeLen(s: number, len?: number): this`

`retain(s: number, e?: number): this`

`retainLen(s: number, len?: number): this`

`replace(s: number, e: number, str: string): this`

`replaceLen(s: number, len: number, str: string): this`

`charAt(idx: number): string`

`charCodeAt(idx: number): number | undefined`

`firstChar(): string`

`firstCharCode(): number | undefined`

`lastChar(): string`

`lastCharCode(): number | undefined`

`findFirst(char: string): number | undefined`

`findLast(char: string): number | undefined`

`clear(): void`

`len(): number`

`isEmpty(): boolean`

`toString(): string`