open-index/open-npm huggingface dataset:
npm package: @kiefer/scratch
Description: A smooth and easy-to-use scratch card component for react
Author: Oc1s
Latest version: 1.0.0

# @kiefer/scratch

A smooth and easy-to-use canvas scratch card component

## Using this package

Run the following command:

```sh
npm install @kiefer/scratch
```

Learn more about this package at our [Doc Page](https://oc1s.github.io/scratch-card/)

## API

| Attritube | Type | Description | Default |
| --- | --- | ----- | --- |
| id | `string` | The id of canvas DOM | `scratch-card` |
| width | `number` | The width of canvas DOM | - |
| height | `number` | The height of canvas DOM | - |
| available | `boolean` | If it's available to scratch | `true` |
| finishTransition | `boolean` | If the transition is enabled when it's finished | `true` |
| cover | `string` | Cover image of scratch card | - |
| threshold | `number` | Threshold to finish scratching automatically | `0.95` |
| fadeDuration | `number` | Duration for cover fade out | `1` |
| scratchRadius | `number` | Radius while scratching | `15` |
| fillStyle | `number` | FillStyle under img | `#fff` |
| onFill | `() => void` | Callback when fillArea | - |
| onFinishStart | `() => void` | Callback when finish transition start | - |
| onFinish | `() => void` | Callback when scratching finished | - |
npm package: @kieis/eslint-config
Description: ESLint configuration.
Latest version: 1.0.0

# Rocketseat ESLint config

## Whats included?

- Standard config base;
- React plugin;
- React Hooks plugin;
- JSX a11y plugin;
- Prettier;

## Setup

1. Install the dependencies
```
npm i -D eslint @rocketseat/eslint-config
```

2. Create a `.eslintrc.json` file extending the config:
```
{
  "extends": "@rocketseat/eslint-config/react"
  // "extends": "@rocketseat/eslint-config/node"
}
```

> You can also use a `.eslintrc.js` instead of JSON if you prefer.
npm package: @kiemonc/regulex
Description: Regular Expression Excited!
Author: Jex
Latest version: 1.0.20

# Regulex

[Regulex](https://jex.im/regulex/) is a JavaScript Regular Expression Parser & Visualizer.

Try it now: <https://jex.im/regulex/>

**This project is under reconstruction!**

Project was forked from https://github.com/CJex/regulex on 28.11.2023

I would like to maintain it to be compatible with Angular 15.9

### Features

- Written in pure JavaScript. No backend required.
- You can embed the graph on you own site through HTML iframe element.
- Detailed error message. In most cases it can point out the precise syntax error position.
- No support for octal escape. Yes it is a feature! ECMAScript strict mode doesn't allow octal escape in string, but many browsers still allow octal escape in regex. In regulex, DecimalEscape will always be treated as back reference. If the back reference is invalid, e.g. `/\1/`, `/(\1)/`, `/(a)\2/`, or DecimalEscape appears in charset（because in this case it can't be explained as back reference, e.g. `/(ab)[\1]/`, Regulex will always throw an error.

### Install for Node.js
```
npm install @kiemonc/regulex
```


### Local Build for Browser
This command will generate bundle `dist/regulex.js` for browser side:
```bash
git checkout legacy
npm install -g requirejs
r.js -o build-config.js
```

### API

#### Parse to AST

```javascript
var parse = require("regulex").parse;
var re = /var\s+([a-zA-Z_]\w*);/ ;
console.log(parse(re.source));
```

#### Visualize

```javascript
var parse = require("regulex").parse;
var visualize = require("regulex").visualize;
var Raphael = require('regulex').Raphael;
var re = /var\s+([a-zA-Z_]\w*);/;
var paper = Raphael("yourSvgContainerId", 0, 0);
try {
  visualize(parse(re.source), getRegexFlags(re), paper);
} catch(e) {
  if (e instanceof parse.RegexSyntaxError) {
    logError(re, e);
  } else {
    throw e;
  }
}

function logError(re, err) {
  var msg = ["Error:" + err.message, ""];
  if (typeof err.lastIndex === "number") {
    msg.push(re);
    msg.push(new Array(err.lastIndex).join("-") + "^");
  }
  console.log(msg.join("\n"));
}


function getRegexFlags(re) {
  var flags = "";
  flags += re.ignoreCase ? "i" : "";
  flags += re.global ? "g" : "";
  flags += re.multiline ? "m" : "";
  return flags;
}
```