open-index/open-npm huggingface dataset:
npm package: @knight_42/unode
Description: Run scripts written in ES5/6 syntax
Author: knight_42
Latest version: 1.0.2

# unode

[![Build](https://travis-ci.org/knight42/unode.svg?branch=master)](https://travis-ci.org/knight42/unode)

Run js scripts written in ES5/6 syntax

## Install

```bash
npm i -g @knight_42/unode
```

## Usage

```
unode index.js...
```
npm package: @knightburton/react-hooks-toolkit
Description: The most commonly used custom react hooks in one place.
Author: Imre Kiss
Latest version: 1.1.2

# react-hooks-toolkit

[![Development Workflow](https://github.com/knightburton/react-hooks-toolkit/actions/workflows/development.yml/badge.svg)](https://github.com/knightburton/react-hooks-toolkit/actions/workflows/development.yml)
![npm](https://img.shields.io/npm/v/@knightburton/react-hooks-toolkit)
![npm](https://img.shields.io/npm/dt/@knightburton/react-hooks-toolkit)

The most commonly used custom react hooks in one place.

Unlike the other packages like this, it only targets core custom hooks to keep everything on minimal.
These core custom hooks are the following:
- [useDebounce](/src/useDebounce/README.md)
- [useDebounceFunction](/src/useDebounceFunction/README.md)
- [useFetch](/src/useFetch/README.md)
- [useInterval](/src/useInterval/README.md)
- [usePrevious](/src/usePrevious/README.md)
- [useTimeout](/src/useTimeout/README.md)

### Getting started
#### Compatibility
Your project needs to use [React.js](https://reactjs.org/) 16.9 or later.

#### Installation
```bash
$ npm i @knightburton/react-hooks-toolkit
```
or
```bash
yarn add @knightburton/react-hooks-toolkit
```

### Usage
Here's an example of basic usage:
```tsx
import React, { useState } from 'react';
import { usePrevious } from '@knightburton/react-hooks-toolkit';

const App = () => {
  const [value, setValue] = useState<number>(0);
  const previouseValue = usePrevious<number>(value);

  const handleClick = (event: React.MouseEvent<HTMLButtonElement>): void => {
    setValue(Math.floor(Math.random() * 101));
  };

  return (
    <>
      <p>The previous random number <strong>{previouseValue || 0}</strong></p>
      <p>The current random number <strong>{value}</strong></p>
      <input type="button" value="Random" onClick={handleClick} />;
    </>
  );
};

export default App;
```
For more example/usage visit each hooks own documentation.

### Contributing
First off all, thanks for taking the time to contribute! :muscle:

Before any action, please visit the [Code of Conduct](https://github.com/knightburton/react-hooks-toolkit/blob/main/CODE_OF_CONDUCT.md) and [Contributing guideline](https://github.com/knightburton/react-hooks-toolkit/blob/main/CONTRIBUTING.md) for more information.

### License

`react-hooks-toolkit` is Open Source software under the MIT license. Complete license and copyright information can be found within the [license](https://github.com/knightburton/react-hooks-toolkit/blob/main/LICENSE).
npm package: @knighted/display-name
Description: Codemod to add a React displayName to function components.
Author: KCM
Latest version: 1.0.0

# [`@knighted/display-name`](https://www.npmjs.com/package/@knighted/display-name)

![CI](https://github.com/knightedcodemonkey/display-name/actions/workflows/ci.yml/badge.svg)
[![codecov](https://codecov.io/gh/knightedcodemonkey/display-name/graph/badge.svg?token=R2GF8WJmXE)](https://codecov.io/gh/knightedcodemonkey/display-name)
[![NPM version](https://img.shields.io/npm/v/@knighted/display-name.svg)](https://www.npmjs.com/package/@knighted/display-name)

A codemod to add `displayName` to React function components.

- Works with TypeScript or JavaScript source code.
- Quickly fix [`react/display-name`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md) lint errors.
- Use `displayName` or a named function expression.
- Pass a path to a file, or a string.

## Example

Given

```tsx
import React, { memo } from 'react'

const Foo = memo(({ a }) => {
  return <>{a}</>
})
const Bar = React.forwardRef((props, ref) => <p ref={ref}>bar</p>)
const Baz = memo(
  React.forwardRef((props, ref) => {
    return <p ref={ref}>baz</p>
  }),
)
```

Then running `modify` on the source code (or `modifyFile` on the file path) results in

```tsx
import React, { memo } from 'react'

const Foo = memo(({ a }) => {
  return <>{a}</>
})
Foo.displayName = 'Foo'
const Bar = React.forwardRef((props, ref) => <p ref={ref}>bar</p>)
Bar.displayName = 'Bar'
const Baz = memo(
  React.forwardRef((props, ref) => {
    return <p ref={ref}>baz</p>
  }),
)
```

If running the codemod against a codebase that has recently added `eslint-plugin-react` you can write a script.

```js
import { globSync } from 'node:fs'
import { writeFile } from 'node:fs/promises'
import { modifyFile } from '@knighted/display-name'

const doCodeMod = async () => {
  for (const file of globSync('**/*.tsx', {
    exclude: ['**/node_modules/**', '**/dist/**', '**/build/**'],
  })) {
    await writeFile(file, await modifyFile(file))
  }
}

await doCodeMod()
```

Then optionally run the results through a formatter like `prettier`.

## Options

There are some options, none are required. Most notably you can choose a `style` for adding the display name. The default is `displayName` which adds a displayName property to the function component, or you can choose `namedFuncExpr` to use a named function expression instead.

```ts
type Options = {
  requirePascal?: boolean
  insertSemicolon?: boolean
  modifyNestedForwardRef?: boolean
  style?: 'displayName' | 'namedFuncExpr'
}
```

For example, using `namedFuncExpr`

```tsx
const Foo = memo(() => <>foo</>)
```

becomes

```tsx
const Foo = memo(function Foo() {
  return <>foo</>
})
```
npm package: @knighted/dump
Description: Wrapper around util.inspect to dump your nested objects to the console.
Author: KCM
Latest version: 1.0.3

# [`@knighted/dump`](https://www.npmjs.com/package/@knighted/dump)

![CI](https://github.com/knightedcodemonkey/dump/actions/workflows/ci.yml/badge.svg)
[![NPM version](https://img.shields.io/npm/v/@knighted/dump.svg)](https://www.npmjs.com/package/@knighted/dump)

Wrapper around Node's `util.inpsect` to dump your nested objects to the console.

## Example

```js
import { dump } from '@knighted/dump'

const nested = {
  knighted: {
    code: {
      monkey: {
        bananas: true
      }
    }
  }
}

dump({
  obj: nested,
  prefix: 'prefix',
  opts: { depth: 3, colors: true }
})
```

Output:

```
prefix {
  knighted: { code: { monkey: { bananas: true } } }
}
```

Or simply use `dump.log` if not passing `opts`.

```js
dump.log(nested, 'prefix') // Same output as above
```

## Options

* `obj` The object to dump
* `prefix` Helpful hint prefixed to the dump
* `opts` Same as https://nodejs.org/api/util.html#utilinspectobject-options

`dump.log(obj)` uses `until.inspect(obj, false, null, true)`.
npm package: @knighted/reparse
Description: Multiple swc parsings of the same file with correct spans.
Author: KCM
Latest version: 2.1.0

# [`@knighted/reparse`](https://www.npmjs.com/package/@knighted/reparse)

![CI](https://github.com/knightedcodemonkey/reparse/actions/workflows/ci.yml/badge.svg)
[![codecov](https://codecov.io/gh/knightedcodemonkey/reparse/graph/badge.svg?token=YCGi65lsmO)](https://codecov.io/gh/knightedcodemonkey/reparse)
[![NPM version](https://img.shields.io/npm/v/@knighted/reparse.svg)](https://www.npmjs.com/package/@knighted/reparse)

Multiple SWC parsings of the same file with correct spans.

Provides a workaround for [swc/1366](https://github.com/swc-project/swc/issues/1366).

## Requirements

- Node >= 20.11.0
- `@swc/core` >= 1.5.24 as peer dependency

## Example

There are four exports `reparse`, `reparseFile`, `reparseSync` and `reparseFileSync`.

```js
import { reparse } from '@knighted/reparse'
import assert from 'node:assert/strict'

const ast1 = await reparse('const foo = "bar"')
const ast2 = await reparse('const foo = "bar"')

assert.equal(ast1.span.start, ast2.span.start)
assert.equal(ast1.span.end, ast2.span.end)
```

Sync file example:

```js
import { reparseFileSync } from '@knighted/reparse'

const ast0 = reparseFileSync('./file.ts')
const ast1 = reparseFileSync('./file.ts')

console.log(ast0.span.start === ast1.span.start) // true
```
npm package: @knighted/specifier
Description: Node.js tool for updating your ES module and CommonJS specifiers.
Author: KCM
Latest version: 2.0.9

# [`@knighted/specifier`](https://www.npmjs.com/package/@knighted/specifier)

![CI](https://github.com/knightedcodemonkey/specifier/actions/workflows/ci.yml/badge.svg)
[![codecov](https://codecov.io/gh/knightedcodemonkey/specifier/branch/main/graph/badge.svg?token=5KS9ZB3XDK)](https://codecov.io/gh/knightedcodemonkey/specifier)
[![NPM version](https://img.shields.io/npm/v/@knighted/specifier.svg)](https://www.npmjs.com/package/@knighted/specifier)

Node.js tool for parsing imports to change ESM and CJS [specifiers](https://nodejs.org/api/esm.html#import-specifiers).

- Rewrite specifier values.
- Read metadata about a specifier's [AST](https://www.npmjs.com/package/oxc-parser) node.
- Updates files or strings.
- Parses `import`, `import()`, `import.meta.resolve()`, `export`, `require`, and `require.resolve()`.

## Example

Given a file with some imports and exports:

```ts
// file.ts

import { someLib } from 'some-package'
import { foo } from './path/to/foo.js'

export { bar } from './path/to/bar.js'
```

You can use `specifier` to change the values:

```ts
import { specifier } from '@knighted/specifier'

const update = await specifier.update('file.ts', ({ value }) => {
  if (value === 'some-package') {
    return 'some-package/esm'
  }

  return value.replace('.js', '.mjs')
})

console.log(update)

/*
import { someLib } from 'some-package/esm'
import { foo } from './path/to/foo.mjs'

export { bar } from './path/to/bar.mjs'
*/
```

Or collect the AST nodes:

```ts
import { type Spec, specifier } from '@knighted/specifier'

const nodes: { node: Spec['node']; parent: Spec['parent'] }[] = []

await specifier.update('file.ts', ({ node, parent }) => {
  nodes.push({ node, parent })
})

nodes.forEach(({ node, parent }) => {
  // Do something with the metadata
})
```
npm package: @knighted/walk
Description: Walk an oxc-parser AST with nodes typed correctly.
Author: KCM
Latest version: 1.0.1

# [`@knighted/walk`](https://www.npmjs.com/package/@knighted/walk)

![CI](https://github.com/knightedcodemonkey/walk/actions/workflows/ci.yml/badge.svg)
[![codecov](https://codecov.io/gh/knightedcodemonkey/walk/graph/badge.svg?token=aha6ghyLD8)](https://codecov.io/gh/knightedcodemonkey/walk)
[![NPM version](https://img.shields.io/npm/v/@knighted/walk.svg)](https://www.npmjs.com/package/@knighted/walk)

Walk an [`oxc-parser`](https://www.npmjs.com/package/oxc-parser) AST with nodes typed correctly.

Same API as [`estree-walker`](https://www.npmjs.com/package/estree-walker), other than needing to `await` the walk.

```ts
import { parseSync } from 'oxc-parser'
import { walk } from '@knighted/walk'

const ast = parseSync('file.ts', code)

/**
 * This package exposes an ESM and CJS build, hence the need for `await`.
 * @see https://github.com/Rich-Harris/estree-walker/issues/26#issuecomment-2773408164
 */
await walk(ast.program, {
  enter(node) {
    // node is correctly typed
  },
})
```
npm package: @knighthacks/hackathon
Description: The hackathon backend node API
Author: Suneet Tipirneni
Latest version: 0.1.0-dev-d1c83c6

# KnightHacks Node API

This package provides a simple interface for interacting with the knighthacks backend

### Getting up and running is easy:

```ts
import { API } from '@knighthacks/hackathon';

// Create api instance.
const api = new API();
```

### Example: Fetch Club Events

```ts
const clubEvents: ClubEvent[] = await api.club.getEvents();

// Dates are automatically serialized.
console.log(clubEvents[0].start.toLocaleString());
```

### Example: Manipulate Hacker Data

```ts
const hacker = await api.hackers.get('Bob');

await hacker.setLastName('Joe');
await hacker.setSharingInfo(true);

// Or use a bulk edit...

await hacker.edit({
  lastName: 'Joe',
  canShareInfo: true,
});
```
npm package: @knightkill/tiny
Description: Removes all spaces from a string
Latest version: 2.0.0

# @knightkill/tiny

[![npm (scoped)](https://img.shields.io/npm/v/@knightkill/tiny.svg)](https://github.com/knightkill/tiny) 
[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/react.svg)](https://github.com/knightkill/tiny)

It's the tiniest npm module!
npm package: @knightly/knightly-fixture-1
Description: [![Knightly Build](https://github.com/antfu/knightly/blob/main/res/badge.svg?raw=true)](//github.com/antfu/knightly) ![2020-10-14T04:34:15.294Z](https://img.shields.io/date/1602650055?color=eee&label=)
Author: Anthony Fu
Latest version: 0.0.0-knightly-master.202010140434
npm package: @knightly/vitepress
Description: Vite & Vue powered static site generator
Author: Evan You
Latest version: 0.17.0-knightly-master.202109020101


# [vitepress](https://github.com/vuejs/vitepress)

[![Knightly Build](https://github.com/knightlyjs/knightly/blob/main/res/badge.svg?raw=true)](https://github.com/knightlyjs/knightly) ![2021-09-01T01:08:17.525Z](https://img.shields.io/date/1630458498?color=eee&label=)

[**Unofficial**] Nightly build for [vuejs/vitepress@bdc6c](https://github.com/vuejs/vitepress/tree/bdc6cab3f67e2405f7f73d8036af1dd133e672c4), published automatically by [Knightly](https://github.com/knightlyjs/knightly).

| package (`vitepress`) | `@knightly/vitepress`                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| version (`0.17.0*`)   | `0.17.0-knightly-master.202109010107`                                                                                                             |
| last commit           | release: v0.17.0                                                                                                                                  |
| sha (`master`)        | `bdc6cab3f67e2405f7f73d8036af1dd133e672c4`                                                                                                        |
| changes               | [compare with last release](//github.com/vuejs/vitepress/compare/v0.17.0-knightly-master.202109010107...bdc6cab3f67e2405f7f73d8036af1dd133e672c4) |
| build                 | 2021-09-01T01:08:17.525Z                                                                                                                          |

> [More PRs and branches builds](https://www.npmjs.com/package/@knightly/vitepress?activeTab=versions)

### Usage

To replace the package with nightly build:

via `npm`

```bash
npm i vitepress@npm:@knightly/vitepress@master
```

or edit your `package.json`

```json
"dependencies": {
  "vitepress": "npm:@knightly/vitepress@master"
}
```


<br>
Knightly v0.5.6
npm package: @knightly/vue-router
Description: [![Knightly Build](https://github.com/knightlyjs/knightly/blob/main/res/badge.svg?raw=true)](https://github.com/knightlyjs/knightly) ![2020-10-16T00:59:10.157Z](https://img.shields.io/date/1602809950?color=eee&label=)
Latest version: 4.0.0-knightly-master.202010160059
npm package: @knightly/vue__composition-api
Description: Provide logic composition capabilities for Vue.
Author: liximomo
Latest version: 1.1.2-knightly-master.202108220059


# [@vue/composition-api](https://github.com/vuejs/composition-api)

[![Knightly Build](https://github.com/knightlyjs/knightly/blob/main/res/badge.svg?raw=true)](https://github.com/knightlyjs/knightly) ![2021-08-20T00:59:35.408Z](https://img.shields.io/date/1629421175?color=eee&label=)

[**Unofficial**] Nightly build for [vuejs/composition-api@23de1](https://github.com/vuejs/composition-api/tree/23de15c7adbe18b87b00fba3bec0984900de2897), published automatically by [Knightly](https://github.com/knightlyjs/knightly).

| package (`@vue/composition-api`) | `@knightly/vue__composition-api`                                                                                                                       |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| version (`1.1.1*`)               | `1.1.1-knightly-master.202108200058`                                                                                                                   |
| last commit                      | docs: moving set and del warning to the reactive block (#793)                                                                                          |
| sha (`master`)                   | `23de15c7adbe18b87b00fba3bec0984900de2897`                                                                                                             |
| changes                          | [compare with last release](//github.com/vuejs/composition-api/compare/v1.1.1-knightly-master.202108200058...23de15c7adbe18b87b00fba3bec0984900de2897) |
| build                            | 2021-08-20T00:59:35.408Z                                                                                                                               |

> [More PRs and branches builds](https://www.npmjs.com/package/@knightly/vue__composition-api?activeTab=versions)

### Usage

To replace the package with nightly build:

via `npm`

```bash
npm i @vue/composition-api@npm:@knightly/vue__composition-api@master
```

or edit your `package.json`

```json
"dependencies": {
  "@vue/composition-api": "npm:@knightly/vue__composition-api@master"
}
```


<br>
Knightly v0.5.6
npm package: @knightly/vueuse__shared
Description: [![Knightly Build](https://github.com/knightlyjs/knightly/blob/main/res/badge.svg?raw=true)](https://github.com/knightlyjs/knightly) ![2020-11-09T09:33:40.808Z](https://img.shields.io/date/1604914421?color=eee&label=)
Author: Anthony Fu
Latest version: 4.0.0-knightly-dev.202011090932
npm package: @knightpath/cli
Description: Knightpath cli tool
Author: knightpath
Latest version: 0.0.6

knightpath
==========

Knightpath cmd

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@knightpath/cli.svg)](https://npmjs.org/package/@knightpath/cli)
[![Downloads/week](https://img.shields.io/npm/dw/@knightpath/cli.svg)](https://npmjs.org/package/@knightpath/cli)
[![License](https://img.shields.io/npm/l/@knightpath/cli.svg)](https://github.com/knightpath/cli/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @knightpath/cli
$ knightpath COMMAND
running command...
$ knightpath (-v|--version|version)
@knightpath/cli/0.0.6 darwin-x64 node-v14.16.0
$ knightpath --help [COMMAND]
USAGE
  $ knightpath COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`knightpath api:lint DIR`](#knightpath-apilint-dir)
* [`knightpath api:list DIR`](#knightpath-apilist-dir)
* [`knightpath help [COMMAND]`](#knightpath-help-command)

## `knightpath api:lint DIR`

scan a directory for unofficial/undocumented api

```
USAGE
  $ knightpath api:lint DIR

ARGUMENTS
  DIR  [default: .] directory to scan

OPTIONS
  -h, --help  show CLI help
```

_See code: [src/commands/api/lint.ts](https://github.com/knightpath/cli/blob/v0.0.6/src/commands/api/lint.ts)_

## `knightpath api:list DIR`

Scan directory for APIs

```
USAGE
  $ knightpath api:list DIR

ARGUMENTS
  DIR  [default: .] directory to scan

OPTIONS
  -h, --help           show CLI help
  -o, --output=output  path to output as csv
```

_See code: [src/commands/api/list.ts](https://github.com/knightpath/cli/blob/v0.0.6/src/commands/api/list.ts)_

## `knightpath help [COMMAND]`

display help for knightpath

```
USAGE
  $ knightpath help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.3/src/commands/help.ts)_
<!-- commandsstop -->
* [`knightpath api-lint DIR`](#knightpath-api-lint-dir)
* [`knightpath api-list DIR`](#knightpath-api-list-dir)
* [`knightpath help [COMMAND]`](#knightpath-help-command)

## `knightpath api-lint DIR`

scan a directory for unofficial/undocumented api

```
USAGE
  $ knightpath api:lint DIR

ARGUMENTS
  DIR  [default: .] directory to scan

OPTIONS
  -h, --help  show CLI help
```


## `knightpath api-list DIR`

Scan directory for APIs

```
USAGE
  $ knightpath api:list DIR

ARGUMENTS
  DIR  [default: .] directory to scan

OPTIONS
  -h, --help           show CLI help
  -o, --output=output  path to output as csv
```


## `knightpath help [COMMAND]`

display help for knightpath

```
USAGE
  $ knightpath help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```