open-index/open-npm huggingface dataset:
npm package: @haggholm/damerau-levenshtein
Description: An N-API/C++ port of the Damerau-Levenshtein implementation from natural
Latest version: 1.0.14

# Damerau-Levenshtein distance

A direct port of the Levenshtein/Damerau-Levenshtein
algorithm from [natural](https://github.com/NaturalNode/natural)
to an N-API/C++ extension.

In the browser, it will use the implementation copied from
[natural](https://github.com/NaturalNode/natural), with the
addition of an `offset` parameter in search results.

In NodeJS, it uses the N-API implementation. In tests on production
data on our workload, it is ~15x faster than the original JS; on
smaller strings as used in the automated tests, the speedup is ~27x.

Correctness is based on the assumption that `natural` is correct. :-)
Compliance is currently verified by running distance checks on several
thousand random sample strings and verifying that the N-API generates
identical results.
npm package: @haggholm/longjohn
Description: Long stack traces for node.js inspired by https://github.com/tlrobinson/long-stack-traces
Author: Matt Insler
Latest version: 0.2.12

# longjohn

Long stack traces for [node.js](http://nodejs.org/) with configurable call trace length

## Inspiration

I wrote this while trying to add [long-stack-traces](https://github.com/tlrobinson/long-stack-traces) to my server and realizing that there were issues with support of [EventEmitter::removeListener](http://nodejs.org/api/events.html#events_emitter_removelistener_event_listener).  The node HTTP Server will begin to leak callbacks and any of your own code that relies on removing listeners would not work as anticipated.

So what to do...  I stole the code and rewrote it.  I've added support for removeListener along with the ability to cut off the number of async calls the library will trace.  I hope you like it!

Please thank [tlrobinson](https://github.com/tlrobinson) for the initial implementation!

## Production Use

Longjohn collects a large amount of data in order to provide useful stack traces. While it is very helpful in
development and testing environments, it is not recommended to use longjohn in production. The data collection puts
a lot of strain on V8's garbage collector and can greatly slow down heavily-loaded applications.

## Installation

Just npm install it!

```bash
$ npm install longjohn
```

## Usage

To use longjohn, require it in your code (probably in some initialization code).  That's all!

```javascript
if (process.env.NODE_ENV !== 'production'){
  require('longjohn');
}

// ... your code
```

## Options

#### Limit traced async calls

```javascript
longjohn.async_trace_limit = 5;   // defaults to 10
longjohn.async_trace_limit = -1;  // unlimited
```

#### Change callback frame text

```javascript
longjohn.empty_frame = 'ASYNC CALLBACK';  // defaults to '---------------------------------------------'
```

## Use with Source Maps

As of version 0.2.9 longjonn supports source maps. Just compile your code down to
javascript with source map support and run like normal.

For coffee-script, this would look like:

```bash
$ coffee --map --compile script.coffee
```
npm package: @haghdoostamir/npm-button
Description: This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
Author: Amir
Latest version: 0.1.0

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
npm package: @hagnerd/devto
Description: devto CLI
Latest version: 0.1.1

# devto CLI

A simple CLI for posting to dev.to. This tool was inspired by [Dev.to VSCode Extension](https://github.com/timdeschryver/new-blog-post) made by Tim Deschryver.

## Who is it for?

Do you like to write articles? Are you a programmer? Do you want to make it dead simple to write and post to dev.to?

Then either the VSCode Extension, or this CLI will help you out!

## How to use this

You can:
1. Globally install the tool `npm install --global @hagnerd/devto` or `yarn
   global add @hagnerd/devto` and then use it in the command line with `devto
   <commang>`.
2. Use it with npx `npx @hagnerd/devto <command>` which avoids having to install
   it globally.

## Commands

### devto new [TITLE]

Generates a new blog post, which consists of a folder, a markdown file, and a .devto.json file which will be gitignored by default. This will contain the post id, url, and the path to the file to make publishing more ergonomic.

If you pass a title, make sure to wrap it in strings. If you do not pass a title, you will be prompted for one, in which case you do not need to wrap it in strings.

I know, not great, but this is a quick prototype and unfortunately this was the easiest way to get it to work.

### devto publish

If you are in a directory that has a .devto.json file with a valid path to a markdown file with at least a title field in the frontmatter, then it will attempt to push the article up to dev.to

It will prompt you for a dev.to API key the first time you publish and article, and after that it will save a global config with the key to a .devto file in your home directory. Make sure to globally ignore it in git if you are concerned with your API key getting out.

If you are NOT in a directory that has a .devto.json file or there isn't a valid path, you will be prompted to provide a relative path to a file that meets those requirements.

### devto dashboard

This command opens up dev.to/dashboard in your default browser.

### devto reset

Deletes your global config file (located at .devto in your home directory). The next time you attempt to publish an article, it will re-prompt you for your API key.

# License

MIT - see LICENSE
npm package: @hagnerd/nps
Description: A CLI for adding and modifying your npm scripts
Latest version: 1.0.1

# NPS

## What is NPS?

NPS is a CLI for adding, modifying, extending, and overriding the scripts in
your package.json file.

## Why does NPS exist?

I wanted a way to quickly add, modify, extend, and override the scripts in my
package.json files and I thought others might like the ergonomics as well.

## Why not just open your package.json file and add the script?

Mostly laziness.

## Usage

If you would like you can install globally using either yarn or npm.

```sh
npm install --global @hagnerd/nps
yarn global add @hagnerd/nps
```

After that it will be available with the command `nps`.

If you don't want to install the package globally, just run `npx @hagnerd/nps`.

## What's next?
I'm thinking about adding some nice features like being able to easily select
scripts to delete from the command line, saving a set of scripts to a template,
and being able to add groups of scripts with one command.
npm package: @hagongyi/oc-mainsite-utilities
Description: October CMS main site utilities.
Author: Garfield Lee
Latest version: 0.0.8

# @hagongyi/oc-mainsite-utilities

哈公益 October CMS 常用样式，通用组件和脚本。

`components` 文件夹包含了 October CMS 通用组件，其中的样式部分基于 Bootstrap 4。

`scss/components` 文件夹包含了通用组件的样式，是组件的默认样式，自定义方式参见各组件文档。

`scss` 文件夹下还包含一些常用样式，具体参见文档。

`docs/styles` 文件夹包含了常用样式的文档。

`docs/components` 文件夹包含了通用组件的文档。

## 使用方式

不论是使用组件还是样式或脚本，你都需要 Webpack 作为你的依赖，在使用前，请确保你的项目安装了 Webpack。

### 使用 SCSS 样式

不论是常用样式还是组件样式，在 Webpack 配置文件中写好 SASS/SCSS 的配置并安装好相应的 Webpack Loader，然后在你需要引入样式的地方引入完整路径即可。

```scss
// 引入所有常用样式
@import '~@hagongyi/oc-mainsite-utilities/scss/index.scss';

// 引入组件样式
@import '~@hagongyi/oc-mainsite-utilities/scss/components/oc-page-banner.scss';
```

*注意：组件样式只支持按需引入方式，没有一次性引入所有组件的方式，这么做的目的是为了尽可能减少样式冲突。*

### 使用 October CMS 组件

由于 October CMS 本身不支持通过 `node_modules` 引入 `htm` 格式的组件，所以这里要借助 Webpack 和 File Loader 来实现。

#### Webpack 配置

请先确保安装了 File Loader：

```shell
yarn install -D file-loader
```

在 Webpack 配置里增加如下配置：

```js
{
  test: /\.(htm)$/, // October CMS 只支持 htm 格式的组件文件，所有组件也都以 htm 作为扩展名
  use: {
    loader: 'file-loader',
    options: {
      name: '[name].[ext]', // 保留组件原来的文件名和扩展名，方便在 October CMS 里引入
      outputPath: (url, resourcePath) => {
        // NPM 包里的组件都在 components 文件夹下，并且都有统一的 oc- 前缀
        if (/components\/oc-\S+\.htm/.test(resourcePath)) {
          // 将路径设置为你主题的 partials 文件夹，并且一定要拼接 url 参数，它代表的是组件文件名
          return `path/to/partials/folder/${url}`;
        }
      }
    }
  }
}
```

#### 引入组件的方式

在你的 Webpack `entry` 入口文件引入对应的组件即可，Webpack 会自动将文件拷贝过去：

```js
import '@hagongyi/oc-mainsite-utilities/components/oc-page-banner.htm'
```

*注意：不要忘记将拷贝到 `partials` 文件夹的组件添加到源代码管理系统（git, svn）中，October CMS 不会自动执行 Webpack 命令。*
npm package: @haguili/virtual-keyboard
Description: Customizable unicode virtual keyboard on text input.
Author: Haguili
Latest version: 0.2.2-b2503180143

# Virtual Keyboard

## Run the application as a web extension
First generate extension distributables with `npm run serve-ext`
This will allow live reloading.

Then depending on the browser you want to use run one of those commands:
* `npm run start:firefox`
* `npm run start:chromium`

## Integration as a JS asset
Run `npm run serve-lib` to start the demo application