open-index/open-npm huggingface dataset:
npm package: @lozio/formik-persist
Description: Persist and rehydrate a Formik form
Author: Jared Palmer
Latest version: 1.2.0

# Formik Persist

Persist and rehydrate a [Formik](https://github.com/jaredpalmer/formik) form.

```
npm install formik-persist --save
```

# Basic Usage

Just import the `<Persist >` component and put it inside any Formik form. It renders `null`!

```js
import React from 'react'
import { Formik, Field, Form } from 'formik'
import { Persist } from 'formik-persist'

export const Signup = () =>
  <div>
    <h1>My Cool Persisted Form</h1>
    <Formik
      onSubmit={values => console.log(values)}
      initialValues={{ firstName: '', lastName: '', email: '' }}
      render={props =>
        <Form className="whatever">
          <Field name="firstName" placeholder="First Name" />
          <Field name="lastName" placeholder="Last Name" />
          <Field name="email" type="email" placeholder="Email Address" />
          <button type="submit">Submit</button>
          <Persist name="signup-form" />
        </Form>}
    />
  </div>;
```

### Props

Only three props! 

- `name: string`: LocalStorage key to save form state to
- `debounce:? number`: Default is `300`. Number of ms to debounce the function that saves form state.
- `isSessionStorage:? boolean`: default is `false` . Send if you want Session storage inplace of Local storage


## Author

- Jared Palmer [@jaredpalmer](https://twitter.com/jaredpalmer)


## Todo

- Alternative storages (localForage)
- Support AsyncStorage for React Native
npm package: @lozio/react-watermark
Description: A React Component to wrap watermark text on child component, using generated svg as background-image
Author: hirohe
Latest version: 0.5.0

# React Watermark Component

![version](https://badge.fury.io/js/%40hirohe%2Freact-watermark.svg)


A React Component to wrap watermark text on child component, using generated svg as background-image

## Doc
[Storybook](https://hirohe.github.io/react-watermark/?path=/docs/watermark-test--default)

## Usage:

> this Component requires react version >=16.8.0, in order to use the react hook feature

```bash
yarn add @hirohe/react-watermark
# or
npm i --save @hirohe/react-watermark
```

e.g.

```jsx
import { Watermark } from '@hirohe/react-watermark';

const ContentWithWatermark = () => (
  <Watermark text="Mark">
    <div style={{ width: 500, height: 500, backgroundColor: '#5f5f5f' }}>
      Lorem ipsum
    </div>
  </Watermark>
)
```

![example](https://github.com/hirohe/react-watermark/raw/master/doc/example.png)


## Props

| prop           | description                      | type              | default                      |
|----------------|----------------------------------|-------------------|------------------------------|
| show           | show watermark or not            | boolean           | true                         |
| text           | watermark text                   | string            | -                            |
| textColor      | color of watermark               | color string      | #cccccc                      |
| textSize       | watermark text size in px unit   | number            | 24                           |
| fontFamily     | watermark text font-family       | string            | Arial, Helvetica, sans-serif |
| lineHeight     | watermark text lineHeight        | string            | '1.2rem'                     |
| multiline      | whether text is multiline or not | boolean           | false                        |
| opacity        | watermark text opacity           | number            | 0.2                          |
| rotate         | watermark text rotate degree     | number            | -45                          |
| gutter         | gutter between watermark text    | number            | 0                            |
| wrapperStyle   | style of wrapper                 | CSSProperties     | -                            |
| wrapperElement | element of wrapper               | React.ElementType | 'div'                        |


## TODO

- [x] multiline watermark text
- [x] adjustable space between watermark


## License
MIT License. See `LICENSE.txt` for more information.
npm package: @lozlow/bs-atdgen-codec-runtime
Description: bucklescript runtime for atdgen
Author: Ahrefs
Latest version: 3.0.0

# bs-atdgen-codec-runtime

`bs-atdgen-codec-runtime` is a bucklescript runtime for
[atdgen](https://github.com/ahrefs/atd). It is based on the json type
provided by bucklescript and combinators of
[@glennsl/bs-json](https://github.com/glennsl/bs-json).

## Installation

```
yarn add @ahrefs/bs-atdgen-codec-runtime
```

This package doesn't take care of running atdgen to derive code from
type definitions. This step requires the `atdgen` binary which can be
obtained using [opam](https://opam.ocaml.org/) or [esy](https://esy.sh/).

Alternatively, if your project is using BuckleScript exclusively (i.e. not using native OCaml or Reason in the backend),
you might consider using [`bs-atdgen-generator`](https://github.com/jchavarri/bs-atdgen-generator) in combination with
this runtime library, in order to generate the `.ml` and `.mli` files from `.atd` sources without having to use native
package managers like `esy` or `opam`.

## Usage

Add `@ahrefs/bs-atdgen-codec-runtime` to the `bs-dependencies` of
`bsconfig.json`.

To write atd type definitions, please have a look at the [great atd
documentation](https://atd.readthedocs.io/en/latest/).

## Simple example

Reason code to query and deserialize the response of a REST API. It
requires `bs-fetch`.

```
let get = (url, decode) =>
  Js.Promise.(
    Fetch.fetchWithInit(
      url,
      Fetch.RequestInit.make(~method_=Get, ()),
    )
    |> then_(Fetch.Response.json)
    |> then_(json => json |> decode |> resolve)
  );

let v: Meetup_t.events =
  get(
    "http://localhost:8000/events",
    Atdgen_codec_runtime.Decode.decode(Meetup_bs.read_events),
  );
```

## Full example

The [example](example) directory contains a full example of a simple
cli to read and write data in a JSON file.

For a complete introduction from atdgen installation to json
manipulation, please refer to [Getting started with atdgen and
bucklescript](https://tech.ahrefs.com/getting-started-with-atdgen-and-bucklescript-1f3a14004081).
npm package: @lozlow/bs-atdgen-generator
Description: Atdgen prebuilt binaries for 3 major OS platforms.
Author: Pete Shaw
Latest version: 0.2.0

# Project is under migration
The installation instructions still point to the old binaries, the project has changed owners but I haven't had a chance to publish binaries under my name yet. Apologies.

# bs-atdgen-generator

[Atdgen](https://github.com/ahrefs/atd) prebuilt binaries for 3 major OS platforms.

Mainly for BuckleScript users, to avoid the step of installing esy.

## Getting started

(Prefer example? Check the [test](./test) folder)

With yarn:

```
yarn add -D @lozlow/bs-atdgen-generator
yarn --check-files
```

Tell bsb which files need to be processed:

```json
"generators": [
  {
    "name": "atd_t",
    "command": "yarn run atdgen -t $in"
  },
  {
    "name": "atd_bs",
    "command": "yarn run atdgen -bs $in"
  }
],
```

Or with node:
```
npm install @jchavarri/bs-atdgen-generator --save-dev
```

And then:

```json
"generators": [
  {
    "name": "atd_t",
    "command": "npx atdgen -t $in"
  },
  {
    "name": "atd_bs",
    "command": "npx atdgen -bs $in"
  }
],
```

Now that the generator is defined, add the files that need to be processed to `sources` (still in `bsconfig`):

```json
"sources": {
  "dir" : "src",
  "subdirs" : true,
  "generators": [
    {
      "name": "atd_t",
      "edge": ["meetup_t.ml", "meetup_t.mli", ":", "meetup.atd"]
    },
    {
      "name": "atd_bs",
      "edge": ["meetup_bs.ml", "meetup_bs.mli", ":", "meetup.atd"]
    }
  ]
},
```

## For Windows users

Unfortunately, it's not possible for `npx` or `yarn run` to work directly in Windows environments, due to
the way [ninja calls CreateProcess](https://github.com/jchavarri/bs-atdgen-generator/pull/3#issue-415706268).

In order to use atdgen for this platform, there are two options:

#### 1. Use relative path

In `bsconfig.json`:

```diff
"generators": [
  {
    "name": "atd_t",
-   "command": "npx atdgen -t $in"
+   "command": "../../node_modules/\@jchavarri/bs-atdgen-generator/atdgen.exe -t $in"
  },
  {
    "name": "atd_bs",
-   "command": "npx atdgen -bs $in"
+   "command": "../../node_modules/\@jchavarri/bs-atdgen-generator/atdgen.exe -bs $in"
  }
],
```

#### 2. Use `cmd /c`:

```diff
"generators": [
  {
    "name": "atd_t",
-   "command": "npx atdgen -t $in"
+   "command": "cmd /c npx atdgen -t $in"
  },
  {
    "name": "atd_bs",
-   "command": "npx atdgen -bs $in"
+   "command": "cmd /c npx atdgen -bs $in"
  }
],
```

Both solutions are shell independent, and work with both Powershell and Windows bash.
npm package: @lp-clash/rule-providers
Description: A self-used collection of rule providers
Author: lpeng
Latest version: 1.3.0

# Rule Providers

A private collection of `clash` rule providers. :key::unlock:

## jsDelivr links

```javascript
// classical
https://cdn.jsdelivr.net/npm/@lp-clash/rule-providers@latest/dist/rule-providers/rules.classical.yaml

// domain
https://cdn.jsdelivr.net/npm/@lp-clash/rule-providers@latest/dist/rule-providers/rules.domain.yaml
```

**_Note:_** Recommend using `classical` type links

## Software

- [Clash for Windows](https://github.com/Fndroid/clash_for_windows_pkg)

## How to

1. Open `Clash for Windows` software.
2. Select `Settings` from the left sidebar.
3. Navigate to `Profiles`, select the `Edit` button to open the parser file in a text editor, and proceed to modify it. [ [Config wiki](https://docs.cfw.lbyczf.com/contents/parser.html#%E8%BF%9B%E9%98%B6%E6%96%B9%E6%B3%95-javascript) ]
4. Pick an appropriate jsDelivr link to use in the parsers file.

## Configuration and Wiki

- [Clash Doc](https://dreamacro.github.io/clash/)

- [Rule Providers](https://dreamacro.github.io/clash/premium/rule-providers.html)

- [Clash for Windows Doc](https://docs.cfw.lbyczf.com/)

- [Clash for Windows 配置文件预处理](https://docs.cfw.lbyczf.com/contents/parser.html#%E7%89%88%E6%9C%AC%E8%A6%81%E6%B1%82)

- [什么是 rule-provider、proxy-provider？怎么用？clash 分流规则终极使用方法，还支持 clash、openclash、clash for window, Stash, ClashX Pro 客户端](https://www.jamesdailylife.com/rule-proxy-provider)

- [jsDelivr Doc](https://www.jsdelivr.com/documentation)

- [Parsers Config](https://docs.cfw.lbyczf.com/contents/parser.html#%E8%BF%9B%E9%98%B6%E6%96%B9%E6%B3%95-javascript)

### Doc Help

[Markdown guide](https://www.markdownguide.org/)
npm package: @lpaolini/xmlhttprequest
Description: XMLHttpRequest for Node
Author: Dan DeFelippi
Latest version: 1.8.1

# node-XMLHttpRequest #

node-XMLHttpRequest is a wrapper for the built-in http client to emulate the
browser XMLHttpRequest object.

This can be used with JS designed for browsers to improve reuse of code and
allow the use of existing libraries.

Note: This library currently conforms to [XMLHttpRequest 1](http://www.w3.org/TR/XMLHttpRequest/). Version 2.0 will target [XMLHttpRequest Level 2](http://www.w3.org/TR/XMLHttpRequest2/).

## Usage ##

Here's how to include the module in your project and use as the browser-based
XHR object.

	var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
	var xhr = new XMLHttpRequest();

Note: use the lowercase string "xmlhttprequest" in your require(). On
case-sensitive systems (eg Linux) using uppercase letters won't work.

## Versions ##

Prior to 1.4.0 version numbers were arbitrary. From 1.4.0 on they conform to
the standard major.minor.bugfix. 1.x shouldn't necessarily be considered
stable just because it's above 0.x.

Since the XMLHttpRequest API is stable this library's API is stable as
well. Major version numbers indicate significant core code changes.
Minor versions indicate minor core code changes or better conformity to
the W3C spec.

## License ##

MIT license. See LICENSE for full details.

## Supports ##

* Async and synchronous requests
* GET, POST, PUT, and DELETE requests
* All spec methods (open, send, abort, getRequestHeader,
  getAllRequestHeaders, event methods)
* Requests to all domains

## Known Issues / Missing Features ##

For a list of open issues or to report your own visit the [github issues
page](https://github.com/driverdan/node-XMLHttpRequest/issues).

* Local file access may have unexpected results for non-UTF8 files
* Synchronous requests don't set headers properly
* Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!).
* Some events are missing, such as abort
* Cookies aren't persisted between requests
* Missing XML support
npm package: @lpc-lang/bedoc
Description: BeDoc parser for LPC
Author: jlchmura
Latest version: 1.0.7

# @lpc-lang/bedoc

An LPC parser for [BeDoc](https://github.com/gesslar/bedoc), a powerful, pluggable documentation generator designed to handle any programming language and output format.

This parser uses the [lpc-lang](https://www.npmjs.com/package/@lpc-lang/core) language parser library from the [LPC Language Server](https://github.com/jlchmura/lpc-language-server) project to parse LPC code, extract function declarations, and generate documentation from their signature and LPCDoc comments.

A markdown printer is included to generate markdown documentation from the parsed data.

## Installation

Install from [npm](https://www.npmjs.com/package/@lpc-lang/bedoc):

```bash
npm install -g @lpc-lang/bedoc
```

## Use

For information on how to use this parser, see the official [BeDoc documentation](https://bedoc.gesslar.dev/).