open-index/open-npm huggingface dataset:
npm package: @figliolia/child-process
Description: A wrapper around the node.js spawn function providing a promise and graceful exiting
Latest version: 1.0.4

# Child Process
A small wrapper around the Node.js `ChildProcess.spawn` function that provides access to not only the child process, but a wrapping promise to use in your JavaScript logic.

# Getting Started

## Installation
```bash
npm install --save @figliolia/child-process
# or
yarn add @figliolia/child-process
```

### Basic Usage

```typescript
import { ChildProcess } from "@figliolia/child-process";

const CP = new ChildProcess(
  "some shell command"
);

// Await the completion of your command
await CP.handler;

// Use the raw child process in your code
CP.process.on("something", () => {});

// If you do not need access to the underlying child process, 
// but instead wish to have just a promise with stdio access
const { stdout, stderr } = await ChildProcess.execute("your command");
```

### Advanced Usage
It's fairly common to require the management of multiple sub-process when building complex applications such as development environments, CI's, and more.

This library provides a means for handling multiple child processes as well as binding to kill exit signals that may cause an underlying application to fail.

```typescript
import { ChildProcess } from "@figliolia/child-process";

class MyApplication {

	public static run() {
		const shells = this.bootStuffUp();
		// Kill each shell if the parent process receives
		// a kill signal or uncaught exception
		ChildProcess.bindExits(shells);
		// Await the completion of all commands
		return Promise.all(shells.map(CP => CP.handler));
	}

	private static bootStuffUp() {
		return [
			new ChildProcess(
				"some shell command"
			),
			new ChildProcess(
				"another shell command"
			),
			new ChildProcess(
				"perhaps another shell command"
			),
		]
	}
}
```
npm package: @figliolia/classnames
Description: A classnames compiler for DOM elements
Author: Alex Figliolia
Latest version: 1.0.1

# Class Names
A basic compiler for CSS classes 

## Installation
```bash
npm i @figliolia/classnames
# or
yarn add @figliolia/classnames
```

### Basic Usage
```typescript
import { classnames } from "@figliolia/classnames";

const classes = classnames("ui-component", { active: true, hidden: false, focused: false });
// "ui-component active focused"
```

### Usage With React
```tsx
import { useClassNames } from "@figliolia/classnames";

export const UIComponent = (props: { 
  active: boolean, 
  hidden: boolean,
  focused: boolean, 
}) => {
  // only recomputes on prop-changes
  const classNames = useClassNames("ui-component", props);
  return (
    <div className={classNames}>
      {/* Other Markup */}
    </div>
  );
}
```
npm package: @figliolia/day-night-toggle
Description: A dark mode toggle with day/night visualizations built for React
Author: Alex Figliolia
Latest version: 1.0.5

# Day Night Toggle
A dark mode toggle with day/night visualizations built for React

<video title="Demo" src="https://github.com/user-attachments/assets/7166c32d-6ef5-41cc-a95d-cf62b111a4c5" height="auto" width="auto"></video>

## Installation
```bash
npm i @figliolia/day-night-toggle
# or 
yarn add @figliolia/day-night-toggle
```

### Basic Usage
Rendering your toggle:
```tsx
import { ITheme, DayNightToggle } from "@figliolia/day-night-toggle";

const App = () => {
  const [theme, setTheme] = useState<ITheme>("light");
  return (
    <DayNightToggle theme={theme} onChange={setTheme} />
  );
}
```

### Changing the Size of your toggle (CSS)
The toggle scales based on a custom property (`--height`) on the component. It's the only value that needs to change when scaling the dimensions of the toggle:
```css
.my-app .day-night-toggle {
  --height: <your-value>;
}
```

### Browser Support
This package relies on CSS `@property` rules as well as CSS custom properties in order to function. For more detailed information on specific browser version support, please reference the [Can I Use @property](https://caniuse.com/?search=%40property) and [Can I Use CSS Custom Properties](https://caniuse.com/?search=CSS%20custom%20properties) support tables.