open-index/open-npm huggingface dataset:
npm package: @lemmmy/babel-plugin-use-what-changed
Description: This babel plugin us used with [@simbathesailor/use-what-changed](https://github.com/simbathesailor/use-what-changed).
Author: simbathesailor
Latest version: 2.0.5

# babel-plugin-use-what-changed

This babel plugin us used with [@simbathesailor/use-what-changed](https://github.com/simbathesailor/use-what-changed).

## Usage

The package can also be used with a babel plugin which make it more easy to debug.

1. Run

```

npm i @simbathesailor/use-what-changed --save-dev

```

2. Run

```

npm i @simbathesailor/babel-plugin-use-what-changed --save-dev

```

Add the plugin entry to your babel configurations

```js
{
  "plugins": [
    [
      "@simbathesailor/babel-plugin-use-what-changed",
      {
        "active": process.env.NODE_ENV === "development" // boolean
      }
    ]
  ]
}
```

Make sure the comments are enabled for your development build. As the plugin is solely dependent on the comments.

Now to debug a useEffect, useMemo or useCallback. You can do something like this:

```jsx
// uwc-debug
React.useEffect(() => {
  // console.log("some thing changed , need to figure out")
}, [a, b, c, d]);

// uwc-debug
const d = React.useCallback(() => {
  // console.log("some thing changed , need to figure out")
}, [a, b, d]);

// uwc-debug
const d = React.useMemo(() => {
  // console.log("some thing changed , need to figure out")
}, [a]);
```

### uwc-debug-below

Can use 'uwc-debug-below' comment to enable the debugging below the specific line.

```jsx
// uwc-debug-below
React.useEffect(() => {
  // console.log("some thing changed , need to figure out")
}, [a, b, c, d]);

const d = React.useCallback(() => {
  // console.log("some thing changed , need to figure out")
}, [a, b, d]);

const d = React.useMemo(() => {
  // console.log("some thing changed , need to figure out")
}, [a]);
```

All the react hooks below 'uwc-debug-below' will now be in debug mode.

**UPDATE**

Now, you can also see the file name with the hook name. E.g

> 2 useCallback::example/index.tsx 🧐👇

No need to add any import for use-what-changed, you just need to add a comment //uwc-debug' above your hooks and you should start seeing use-what-changed debug consoles.

<strong>Note: Frankly speaking the whole package was built, cause I was facing problems with hooks and debugging it was eating up a lot of my time. Definitely using this custom hook with babel plugin have saved me a lot of time and also understand unknown code using hooks</strong>
npm package: @lemmmy/geoip2-cli
Description: Code and command-line utils for download and convert geoip2 maxmind mmdb
Author: Sviatoslav H
Latest version: 2.0.0

# GeoIP2 CLI

<a href="https://www.npmjs.com/package/@lemmmy/geoip2-cli"><img src="https://img.shields.io/npm/v/@lemmmy/geoip2-cli.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/package/@lemmmy/geoip2-cli"><img src="https://img.shields.io/npm/l/@lemmmy/geoip2-cli.svg" alt="Package License" /></a>

## Table of Contents

- [Description](#description)
- [Command line](#command-line)
- [User in code](#use-in-code)
- [License](#license)

## Description

Code and command-line utils for download and convert geoip2 maxmind mmdb

## Command line

#### Globally via `npm`

```sh
npm install --global geoip2-cli
```

#### Running on-demand:

```sh
npx geoip2-cli [options]
```

### Examples

```sh
npx geoip2-cli --help
```

```sh
    'usage: geoip2-cli [options]',
    '',
    'options:',
    '  --download       Download [false]',
    '  --downloadPath   Path to download [./geoip2-cli]',
    '  --licenseKey     Your license key [error]',
    '  --editions       Editions: city, country, asn [city]',
    '  --date           Database date version [empty]',
    '',
    '  --convert        Convert [false]',
    '  --mmdbPath       Path to .mmdb [./geoip2-cli/GeoLite2-City.mmdb]',
    '  --jsonPath       Path to .json [mmdbPath + .json]',
    '',
    '  --help           Print this list and exit',
    '  --version        Print the version and exit.',
    '',
    'env:',
    '  GEOIP2_CLI_LICENCE_KEY',
```

## Use in code

### Installation

```bash
npm install geoip2-cli
```

### Examples

```ts
import { Geoip2CliDownloader } from 'geoip2-cli';

await Geoip2CliDownloader
    .download({ licenseKey, date, edition, downloadPath })
    .then(path => console.log(path));
```

```ts
import { Geoip2CliConverter } from 'geoip2-cli';

const converter = Geoip2CliConverter.openSync('GeoLite2-City.mmdb');
const result = converter.getUnique();
```

## License

MIT
npm package: @lemmmy/geoip2-downloader
Description: Download the latest MaxMind GeoIP2 database
Author: Lemmmy
Latest version: 1.0.1

# GeoIP2 Downloader

This module is a simple downloader for the [MaxMind GeoIP2 database](https://www.maxmind.com/en/geoip-demo). It is
extracted from [my fork](https://github.com/Lemmmy/geoip2-cli) of svtslv's
[geoip2-cli](https://github.com/svtslv/geoip2-cli) project, and is intended to be used in conjunction with the
[maxmind](https://www.npmjs.com/package/maxmind) module.

**Only** downloads the database, does not do any lookups or conversions. Currently only downloads to a file.

This is an ES module.

### Installation

```bash
yarn add @lemmmy/geoip2-downloader
```

### Examples

```ts
import { downloadGeoip2 } from "@lemmmy/geoip2-downloader";

await downloadGeoip2
  .download({
    licenseKey:   process.env.MAXMIND_LICENSE_KEY,
    edition:      "city", // One of: "city", "country", "asn"
    downloadPath: "/geoip-databases/", // Directory to download to, will be created with mkdirp
    date:         "", // Optional, defaults to latest
  })
  .then(path => console.log(path));
```

## License

MIT
npm package: @lemmon/custom-textarea
Description: Web Components custom-textarea element.
Author: lemmon
Latest version: 0.2.2

# \<custom-textarea\>

Web Components custom-textarea element.

Reason behind this component is to create a plain unstyled autogrowing textarea.

[Demo](https://www.lemmonjuice.com/custom-textarea/)

## Install

```sh
npm i @lemmon/custom-textarea
```

or reference directly:

```html
<script src="https://unpkg.com/@lemmon/custom-textarea">
```

### Usage

```js
// does register the component for you
// with `custom-textarea` tagname
import '@lemmon/custom-textarea'
```

or

```js
// does not register the component,
// useful when you want to extend the component
// or to chose a different tag name
import Textarea from '@lemmon/custom-textarea/textarea'
class TextareaUpgraded extends Textarea {}
customElements.define('upgraded-textarea', TextareaUpgraded)
```

### Use With The CDN

```html
<script type="module" src="https://unpkg.com/@lemmon/custom-textarea"></script>

<!-- or for the ES5 version -->

<script src="https://unpkg.com/@lemmon/custom-textarea/dist/es5.js"></script>
```

## Example

```html
<custom-textarea name="text">Hello World!</custom-textarea>
```

You can apply your own styles. Fonts, colors, line-height, and padding are inherited. Placeholder styles can be defined using CSS variables.

```css
custom-textarea {
  --placeholder-color: orange; /* default: inherit */
  --placeholder-opacity: 1; /* default: 0.5 */
}
```

## License

MIT
npm package: @lemmsoft/code-notes
Description: A tool for creating and displaying code annotations.
Author: Rumen Rumenov
Latest version: 0.4.1

![npm](https://img.shields.io/npm/v/@lemmsoft/code-notes.svg)
<br/>
Code Notes
==
Code notes - A tool for creating and displaying code annotations.<br/>
&nbsp;&nbsp;Usage: `code-notes -p 9001`<br/>
&nbsp;&nbsp;&nbsp;&nbsp;This will run a server at port 9001, on which you can see the code notes for the current directory and its children.<br/>
<br/>
&nbsp;&nbsp;There are a number of avilable options:<br/>
&nbsp;&nbsp;&nbsp;&nbsp;-p, --serverPort=&nbsp;&nbsp; (required) the port at which to run the server<br/>
&nbsp;&nbsp;&nbsp;&nbsp;-d, --dir=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(optional) specify the root directory; if not provided, the current working directory is used<br/>
&nbsp;&nbsp;&nbsp;&nbsp;-v, --verbose=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(optional) display detailed execution logs<br/>
<br/>
&nbsp;&nbsp;You can place a ".codenotesignore" file with the same syntax as a typical ".gitignore" file to exclude files and folders from the search.\n`
npm package: @lemoineat/grunt-graph-easy
Description: Use graph-easy to convert text graphs into images
Author: Lemoine Automation Technologies, Nicolas Relange
Latest version: 1.0.1

# grunt-graph-easy

> Use graph-easy to convert text graphs into images


## Getting Started

### Requirements

* Grunt

* graph-easy (on Debian: sudo apt install libgraph-easy-perl)


### Installation

Install this plugin:

```shell
$ npm install grunt-graph-easy --save-dev
```


Include the task in your Gruntfile:

```js
grunt.loadNpmTasks('grunt-graph-easy');
```


## ocamlbuild task

_Run this task with the `grunt graph-easy` command._

### Options

#### format
Type: `String`

Output format: `ascii`, `png`

Default: guess it from destination file suffix


#### grapheasy
Type: `String array`

Additional options to be passed to `graph-easy`.


### Usage Examples

```js
graph-easy: {
  main: {
    files: {
      'dist/images': 'graph/a.txt'
    },
    options:
      format: 'ascii',
      grapheasy: []
  },
},
```

This task supports all the file mapping format Grunt supports. Please read [Globbing patterns](http://gruntjs.com/configuring-tasks#globbing-patterns) and [Building the files object dynamically](http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically) for additional details.


##License

Copyright (c) 2017 Lemoine Automation Technologies

Licensed under the MIT license.
npm package: @lemoineat/jsdoc-plugin-graph
Description: Plugin for JSDoc
Author: Lemoine Automation Technologies, Nicolas Relange
Latest version: 1.0.0

# jsdoc-plugin-graph

> JSDoc plugin to add graphs with the tag @graph


## Getting Started

### Requirements

* jsdoc


### Installation

Install this plugin:

```shell
$ npm install jsdoc-plugin-graph --save-dev
```


##License

Copyright (c) 2017 Lemoine Automation Technologies

Licensed under the MIT license.
npm package: @lemon-clown-wpg/react-hello-world
Description: a demo of react package with ts+react+stylus
Author: lemon-clown
Latest version: 0.0.4

[![npm version](https://img.shields.io/npm/v/@lemon-clown-wpg/react-hello-world.svg)](https://www.npmjs.com/package/@lemon-clown-wpg/react-hello-world)
[![npm download](https://img.shields.io/npm/dm/@lemon-clown-wpg/react-hello-world.svg)](https://www.npmjs.com/package/@lemon-clown-wpg/react-hello-world)
[![npm license](https://img.shields.io/npm/l/@lemon-clown-wpg/react-hello-world.svg)](https://www.npmjs.com/package/@lemon-clown-wpg/react-hello-world)


This is a demo project that demonstrates how to package a libary that uses the `react`+`stylus`+`ts` technology stack.

![hello-world.png][]


See [sourcecodes in github](https://github.com/lemon-clown/web-play-ground/tree/master/packages/react-hello-world#readme) to get more information.


# Usage

  * Install
    ```shell
    yarn add @lemon-clown-wpg/react-hello-world
    # you aslo should install peerDependencies if the terminal prompts for a warnning
    ```

  * Use in React project
    ```typescript
    // index.tsx
    import React from 'react'
    import ReactDOM from 'react-dom'
    import { HelloWorld } from '@lemon-clown-wpg/react-hello-world'


    ReactDOM.render(
      <HelloWorld />
      , document.getElementById('root')
    )
    ```


[hello-world.png]: https://raw.githubusercontent.com/lemon-clown/web-play-ground/master/packages/react-hello-world/doc/screenshots/hello-world.png
npm package: @lemon-clown-wpg/react-pdf-viewer
Description: a simple react pdf viewer
Author: lemon-clown
Latest version: 0.0.2

[![npm version](https://img.shields.io/npm/v/@lemon-clown-wpg/react-pdf-viewer.svg)](https://www.npmjs.com/package/@lemon-clown-wpg/react-pdf-viewer)
[![npm download](https://img.shields.io/npm/dm/@lemon-clown-wpg/react-pdf-viewer.svg)](https://www.npmjs.com/package/@lemon-clown-wpg/react-pdf-viewer)
[![npm license](https://img.shields.io/npm/l/@lemon-clown-wpg/react-pdf-viewer.svg)](https://www.npmjs.com/package/@lemon-clown-wpg/react-pdf-viewer)


A pdf viewer

![pdf-viewer.png][]


See [sourcecodes in github](https://github.com/lemon-clown/web-play-ground/tree/master/packages/react-pdf-viewer#readme) to get more information.


# Usage

  * Install
    ```shell
    yarn add @lemon-clown-wpg/react-pdf-viewer
    # you aslo should install peerDependencies if the terminal prompts for a warnning
    ```

  * Use in React project
    ```typescript
    import React from 'react'
    import ReactDOM from 'react-dom'
    import { PDFViewer } from '@lemon-clown-wpg/react-pdf-viewer'
    import '@lemon-clown-wpg/react-pdf-viewer/lib/esm/index.css'


    const pdfStyle: React.CSSProperties = {
      width: '100vw',
      height: '100vh',
    }


    // index.tsx
    ReactDOM.render(
      <PDFViewer
        style={ pdfStyle }
        fileUrl="/files/demo.pdf"
      />
      , document.getElementById('root')
    )
    ```

# Options

   property               | required  | type            | default
  :-----------------------|:---------:|:----------------|:-------------
   fileUrl                | `true`    | `string`        |
   fileName               | `false`   | `string`        | `/(?:[^/\\]*[/\\])?([^/\\]+?)(?:#[\s\S]*)?$/.exec(fileUrl)[1] || ''`
   direction              | `false`   | `'ltr' | 'rtr'` | `'ltr'`
   MIN_SCALING            | `false`   | `number`        | 0.50
   MAX_SCALING            | `false`   | `number`        | 4.00
   ZOOM_STEP              | `false`   | `number`        | 0.10
   selectOptions          | `false`   | `number[]`      | [ 0.50, 0.75, 1.00, 1.25, 1.50, 2.00, 3.00, 4.00 ]
   onDocumentLoadError    | `false`   | `Function`      | `undefined`
   onDocumentLoadSuccess  | `false`   | `Function`      | `undefined`

  * `fileUrl`: url of pdf file
  * `fileName`: filename of pdf file
  * `direction`: the text direction
  * `MIN_SCALING`: minimum scaling
  * `MAX_SCALING`: maximum scaling
  * `ZOOM_STEP`: the size of the zoom step
  * `scaleOptions`: Options for the drop-down box
  * `onDocumentLoadError`: Function called in case of an error while loading a document.
    - `onDocumentLoadError?: (error: Error) => void`
  * `onDocumentLoadSuccess`: Function called when the document is successfully loaded.
    - `onDocumentLoadSuccess?: (pdf: pdfjs.PDFDocumentProxy) => void`



[pdf-viewer.png]: https://raw.githubusercontent.com/lemon-clown/web-play-ground/master/packages/react-pdf-viewer/doc/screenshots/pdf-viewer.png
npm package: @lemon-clown-wpg/webpack-rule-tsx
Description: tsx rule of <webpack config>.module.rules
Author: lemon-clown
Latest version: 0.0.1

[![npm version](https://img.shields.io/npm/v/@lemon-clown-wpg/webpack-rule-tsx.svg)](https://www.npmjs.com/package/@lemon-clown-wpg/webpack-rule-tsx)
[![npm download](https://img.shields.io/npm/dm/@lemon-clown-wpg/webpack-rule-tsx.svg)](https://www.npmjs.com/package/@lemon-clown-wpg/webpack-rule-tsx)
[![npm license](https://img.shields.io/npm/l/@lemon-clown-wpg/webpack-rule-tsx.svg)](https://www.npmjs.com/package/@lemon-clown-wpg/webpack-rule-tsx)


# Usage

  * Install
    ```shell
    yarn add --dev @lemon-clown-wpg/webpack-rule-tsx
    ```

  * Use in webpack.config.js/webpack.config.ts
    ```typescript
    import path from 'path'
    import { calcTsxRule, calcOutsideJsRule, calcEslintRule } from '@lemon-clown-wpg/webpack-rule-tsx'

    export default {
      ...
      module: {
        rules: [
          ...
          // First, run the linter.
          // It's important to do this before Babel processes the JS.
          {
            calcEslintRule({
              include: path.resolve('src'),
              eslintOptions: {
                resolvePluginsRelativeTo: __dirname,
              }
            })
          },
          {
            // "oneOf" will traverse all following loaders until one will
            // match the requirements. When no loader matches it will fall
            // back to the "file" loader at the end of the loader list.
            oneOf: [
              ...
              // Process application JS with Babel.
              // The preset includes JSX, Flow, TypeScript, and some ESnext features.
              calcTsRule({
                include: path.resolve('src'),
                isEnvProduction: process.env.NODE_ENV === 'production',
                babelLoaderOptions: { }, // optional
              }),
              // Process any JS outside of the app with Babel.
              // Unlike the application JS, we only compile the standard ES features.
              calcOutsideJsRule({
                shouldUseSourceMap: true,
                babelLoaderOptions: { }, // optional
              }),
              ...
            ]
          }
          ...
        ]
      }
      ...
    }
    ```

# Options
  * `calcTsxRule`: see [TsxRuleProps](https://github.com/lemon-clown/web-play-ground/tree/master/scaffold/webpack-rule-tsx/src/tsx.ts#L6)

  * `calcOutsideJsRule`: see [OutsideJsRuleProps](https://github.com/lemon-clown/web-play-ground/tree/master/scaffold/webpack-rule-tsx/src/outside-js.ts#L6)

  * `calcEslintRule`: see [EslintRuleProps](https://github.com/lemon-clown/web-play-ground/tree/master/scaffold/webpack-rule-tsx/src/eslint.ts#L6)