open-index/open-npm huggingface dataset:
npm package: @raunak96/is-password
Description: Is the String password?
Author: raunak96
Latest version: 1.0.2

# first-npm-package

### Steps:
- Initialise npm 
```bash 
npm init
```
- add relevant code to JS file.
- For Testing:
   - In the root folder for package do the following:
     ```bash
     npm link
     ```
   - Go to a seperate Test folder and do the following:
     ```bash
     npm link <package-name>
     ```
   - Then normally required the package and test it out.

- Then simply do in root folder (make sure you have npm account which is verified):   
  ```bash
     npm publish
  ```
- IF package name is scoped like say @<name>/package-name like in babel for example and if we dont want paid private package which these scoped packages default to, do the following:
   ```bash
      npm publish --access=public
   ```

- To update package version:
  ```bash
    npm version <update_type>
    npm publish
  ```
 where upate_type = <patch|minor|major>
npm package: @raunow/rs-opentrace
Description: Wraps an openTracing framework in order to minimise dependencies
Latest version: 0.2.50

# rs-opentrace

[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/react.svg?style=for-the-badge)](https://www.npmjs.com/package/@raunow/rs-opentrace)
[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/react.svg?style=for-the-badge)](https://www.npmjs.com/package/@raunow/rs-opentrace)
npm package: @rauschma/env-var
Description: ## How to use it
Author: Axel Rauschmayer
Latest version: 1.0.1

# `env-var`

## How to use it

```json
{
  "scripts": {
    "hi": "env-var echo {{npm_package_config_hi}}"
  },
  "config": {
    "hi": "HELLO"
  }
}
```

Works on all platforms (tested on macOS and Windows):

```
% npm run hi
HELLO
```

## Tips

* Use `npm run env` to see which environment variables are available on your system.

## Inspiration

Inspired by [`cross-var` by Elijah Manor](https://github.com/elijahmanor/cross-var). Differences:

* A different syntax for interpolation.
* Interpolation is implemented differently.
* No dependencies.
npm package: @rauschma/helpers
Description: * Helpers for JavaScript and TypeScript that I’m using in my projects. * Currently mostly undocumented. I’ll add documentation and tests over time. * [API documentation](https://rauschma.github.io/helpers/api/)
Author: Axel Rauschmayer
Latest version: 1.0.0

# @rauschma helpers

* Helpers for JavaScript and TypeScript that I’m using in my projects.
* Currently mostly undocumented. I’ll add documentation and tests over time.
* [API documentation](https://rauschma.github.io/helpers/api/)
npm package: @rauschma/iterator-helpers-polyfill
Description: A polyfill for the ECMAScript proposal “Iterator Helpers”
Author: Axel Rauschmayer
Latest version: 0.7.0

# Iterator helpers polyfill

A polyfill for [the ECMAScript proposal “Iterator Helpers”](https://github.com/tc39/proposal-iterator-helpers) ([documentation for this proposal](https://2ality.com/2022/12/iterator-helpers.html)).

## Warning

**Don’t trust this code:**

* It’s mostly untested.
* I cut corners to make the TypeScript types work.

Caveats:

* The focus is on simple code, not on spec compliance.
* I use textual search-and-replace to convert the asynchronous code to synchronous code.
  * Performed via: `npm run syncify`

Functionality:

* This polyfill implements all constructs specified in the proposal.
* This polyfill deliberately does not provide any additional functionality.

## Installation

```js
npm install @rauschma/iterator-helpers-polyfill
```

## Examples

### Polyfill

```js
import assert from 'node:assert/strict';
import '@rauschma/iterator-helpers-polyfill/install'; // install polyfill globally

assert.deepEqual(
  new Set(['a', 'b', 'c']).values()
  .map(x => x + x).toArray(),
  ['aa', 'bb', 'cc']
);

assert.deepEqual(
  new Set(['a', 'b', 'c']).values()
  .filter(x => x <= 'b').toArray(),
  ['a', 'b']
);

assert.deepEqual(
  new Set(['a', 'b', 'c']).values()
  .take(1).toArray(),
  ['a']
);
```

### Library (doesn’t change JavaScript’s globals)

```js
import assert from 'node:assert/strict';
import {XIterator} from '@rauschma/iterator-helpers-polyfill';

assert.deepEqual(
  XIterator.from(new Set(['a', 'b', 'c']))
  .map(x => x + x).toArray(),
  ['aa', 'bb', 'cc']
);

assert.deepEqual(
  XIterator.from(new Set(['a', 'b', 'c']))
  .filter(x => x <= 'b').toArray(),
  ['a', 'b']
);

assert.deepEqual(
  XIterator.from(new Set(['a', 'b', 'c']))
  .take(1).toArray(),
  ['a']
);
```

### More examples

* [`test/sync_test.ts`](https://github.com/rauschma/iterator-helpers-polyfill/blob/main/test/sync_test.ts)
* [`test/async_test.ts`](https://github.com/rauschma/iterator-helpers-polyfill/blob/main/test/async_test.ts)
* [`test/misc_test.ts`](https://github.com/rauschma/iterator-helpers-polyfill/blob/main/test/misc_test.ts)

## Material on iterator helpers

* ECMAScript proposal “Iterator Helpers”: https://github.com/tc39/proposal-iterator-helpers
* Blog post: https://2ality.com/2022/12/iterator-helpers.html
npm package: @rauschma/nodejs-tools
Description: * Helpers for Node.js that I’m using in my projects. * Currently mostly undocumented. I’ll add documentation over time.
Author: Axel Rauschmayer
Latest version: 0.3.0

# @rauschma nodejs-tools

* Helpers for Node.js that I’m using in my projects.
* Currently mostly undocumented. I’ll add documentation over time.
npm package: @rauschma/scripts-help
Description: ## Installation
Author: Axel Rauschmayer
Latest version: 1.1.0

# scripts-help

## Installation

```
npm install @rauschma/scripts-help
```

## Quickly trying out scripts-help

Directory [`demo/`](https://github.com/rauschma/scripts-help/blob/main/demo/package.json) shows how to set up `package.json`. If you want to see the output of `scripts-help` in your terminal, you can clone this repository and:

```
cd scripts-help/
npm install
cd demo/
npm run help
```

If you do this, you’ll see the font styles and colors that scripts-help uses (which, alas, can’t be shown via GitHub’s Markdown code blocks).

## Setting up `package.json`

`package.json`:

```json
{
  "private": true,
  "scripts": {
    "help": "scripts-help",
    "\n========== Building ==========": "",
    "tsc": "tsc",
    "tscwatch": "tsc --watch",
    "\n========== Serving ==========": "",
    "serve": "serve ./site/"
  },
  "scripts-help": {
    "tsc": "Compile the TypeScript to JavaScript.",
    "tscwatch": "Watch the TypeScript source code and compile it incrementally when and if there are changes.",
    "serve": "Serve the generated website via a local server."
  }
}
```

Output of `npm run` (without arguments) inside `demo/`:

```
  help
    scripts-help

========== Building ==========

  tsc
    tsc
  tscwatch
    tsc --watch

========== Serving ==========

  serve
    serve ./site/
```


Output of `npm run help` inside `demo/`:

```
Package “demo”

╔══════╤════════════════════════════════════════════════════════════════════════╗
║ help │ scripts-help                                                           ║
╚══════╧════════════════════════════════════════════════════════════════════════╝

Building

╔══════════╤════════════════════════════════════════════════════════════════════════╗
║ tsc      │ Compile the TypeScript to JavaScript.                                  ║
╟──────────┼────────────────────────────────────────────────────────────────────────╢
║ tscwatch │ Watch the TypeScript source code and compile it incrementally when and ║
║          │ if there are changes.                                                  ║
╚══════════╧════════════════════════════════════════════════════════════════════════╝

Serving

╔═══════╤════════════════════════════════════════════════════════════════════════╗
║ serve │ Serve the generated website via a local server.                        ║
╚═══════╧════════════════════════════════════════════════════════════════════════╝
```
npm package: @rauschma/set-methods-polyfill
Description: A polyfill for the ECMAScript proposal “Set Methods for JavaScript”
Author: Axel Rauschmayer
Latest version: 0.2.0

# Set methods polyfill

A polyfill for [the ECMAScript proposal “Set Methods for JavaScript”](https://github.com/tc39/proposal-set-methods) ([documentation for this proposal](https://2ality.com/2022/12/set-methods.html)).

## Warning

**Don’t trust this code:**

* It’s mostly untested.

Caveats:

* The focus is on simple code, not on spec compliance.

Functionality:

* This polyfill implements all methods specified in the proposal.
* This polyfill deliberately does not provide any additional functionality.

## Installation

```js
npm install @rauschma/set-methods-polyfill
```

## Examples

### Polyfill

```js
import '@rauschma/set-methods-polyfill/install';
import assert from 'node:assert/strict';

assert.deepEqual(
  new Set(['a', 'b', 'c']).union(new Set(['c', 'd'])),
  new Set(['a', 'b', 'c', 'd'])
);
assert.deepEqual(
  new Set(['a', 'b', 'c']).intersection(new Set(['c', 'd'])),
  new Set(['c'])
);
assert.deepEqual(
  new Set(['a', 'b', 'c']).difference(new Set(['c', 'd'])),
  new Set(['a', 'b'])
);

assert.deepEqual(
  new Set(['a', 'b', 'c']).isSubsetOf(new Set(['a'])),
  false
);
assert.deepEqual(
  new Set(['a', 'b', 'c']).isSupersetOf(new Set(['a'])),
  true
);
```

### Library (doesn’t change JavaScript’s globals)

```js
import {union, intersection, difference, isSubsetOf, isSupersetOf} from '@rauschma/set-methods-polyfill';
import assert from 'node:assert/strict';

assert.deepEqual(
  union(new Set(['a', 'b', 'c']), new Set(['c', 'd'])),
  new Set(['a', 'b', 'c', 'd'])
);
assert.deepEqual(
  intersection(new Set(['a', 'b', 'c']), new Set(['c', 'd'])),
  new Set(['c'])
);
assert.deepEqual(
  difference(new Set(['a', 'b', 'c']), new Set(['c', 'd'])),
  new Set(['a', 'b'])
);

assert.deepEqual(
  isSubsetOf(new Set(['a', 'b', 'c']), new Set(['a'])),
  false
);
assert.deepEqual(
  isSupersetOf(new Set(['a', 'b', 'c']), new Set(['a'])),
  true
);
```

### More examples

* [`src/api_test.ts`](https://github.com/rauschma/set-methods-polyfill/blob/main/src/api_test.ts)

## Material on iterator helpers

* ECMAScript proposal “Set Methods for JavaScript”: https://github.com/tc39/proposal-set-methods
* Blog post: https://2ality.com/2022/12/set-methods.html
npm package: @rautils/ngx-fake-encapsulation
Description: <h1 align="center">@rautils/ngx-fake-encapsulation</h1>
Author: Raúl IP
Latest version: 0.0.3

<h1 align="center">@rautils/ngx-fake-encapsulation</h1>

<h3 align="center">Directive that gives the encapsulation of the last host to the component</h3>

<h4 align="center">

![npm version](https://badge.fury.io/js/%40rautils%2Fngx-fake-encapsulation.svg)

![auto deploy](https://github.com/rautils/rautils/workflows/ngx-fake-encapsulation%20deploy/badge.svg)

</h4>

# This is a work in progress

# Demo

[You cann see the demo here](https://rautils.github.io/rautils/?library=ngx-fake-encapsulation)

# Installation

First, install the npm module:

```sh
npm install @rautils/ngx-fake-encapsulation --save
```

or

```sh
yarn add @rautils/ngx-fake-encapsulation
```

# Usage

# API reference

<!-- Work in progress -->
npm package: @rautils/ngx-image-fallback
Description: <h1 align="center">@rautils/ngx-image-fallback</h1>
Author: Raúl IP
Latest version: 0.1.3

<h1 align="center">@rautils/ngx-image-fallback</h1>

<h3 align="center">Library to give a fallback element to an image</h3>

<h4 align="center">

![npm version](https://badge.fury.io/js/%40rautils%2Fngx-image-fallback.svg)

![auto deploy](https://github.com/rautils/rautils/workflows/ngx-image-fallback%20deploy/badge.svg)

</h4>

# This is a work in progress

# Demo

[You cann see the demo here](https://rautils.github.io/rautils/?library=ngx-image-fallback)

# Installation

First, install the npm module:

```sh
npm install @rautils/ngx-image-fallback --save
```

or

```sh
yarn add @rautils/ngx-image-fallback
```

# Usage

## Import the module

```ts
import { NgModule } from '@angular/core';
import { NgxImageFallbackModule } from '@rautils/ngx-image-fallback';

@NgModule({
	imports: [NgxImageFallbackModule],
	bootstrap: [AppComponent],
})
export class AppModule {}
```

## Place the component

```html
<image-fallback [imageSrc]="<source of the image>" [imageAlt]="<alternative text>">
    Anything inside this component will be rendered if the image fails
</image-fallback>
```

# API reference

<!-- Work in progress -->
npm package: @rautils/ngx-tab-focus
Description: <h1 align="center">@rautils/ngx-focus-tab</h1>
Author: Raúl IP
Latest version: 0.1.3

<h1 align="center">@rautils/ngx-focus-tab</h1>

<h3 align="center">Library to style focused elements only by keyboard</h3>

<h4 align="center">

![npm version](https://badge.fury.io/js/%40rautils%2Fngx-tab-focus.svg)

![auto deploy](https://github.com/rautils/rautils/workflows/ngx-tab-focus%20deploy/badge.svg)

</h4>

# This is a work in progress

# Demo

[You cann see the demo here](https://rautils.github.io/rautils/?library=ngx-tab-focus)

# Installation

First, install the npm module:

```sh
npm install @rautils/ngx-tab-focus --save
```

or

```sh
yarn add @rautils/ngx-tab-focus
```

# Usage

## Import the module

```ts
import {NgModule} from '@angular/core';
import {NgxTabFocusModule} from '@rautils/ngx-tab-focus';

@NgModule({
    imports: [
        NgxTabFocusModule
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }
```

## Place the component

```html
<tab-focus>
	<p>I can be focused only by keyboard</p>
</tab-focus>
```

# API reference

<!-- Work in progress -->
npm package: @rautils/schematics
Description: Generates a library for rautils
Latest version: 1.0.2

<h1 align="center"  style="border-bottom: none;">rautils/schematics</h1>

<h3 align="center">Schematics to generate angular libraries for rautils</h3>

# Schemas

## Rautility

Generates a new library for rautils.

- Creates the library in the `projects` folder.
- Crates the file to manually upload the librayr to NPM in `.github/workflows`.
- Sets the module in the examples page.
- Sets the testing environt to `Jest`.
npm package: @rav2040/dotenv
Description: .env loader with extended feature set.
Author: Stuart Kennedy
Latest version: 1.2.1

# @rav2040/dotenv

A non-mutating Node.js library for loading environment variables with TypeScript support.

[![build](https://img.shields.io/github/actions/workflow/status/rav2040/dotenv/unit-tests.yml?branch=main&style=for-the-badge&logo=github)](https://github.com/rav2040/dotenv/actions/workflows/unit-tests.yml)
[![coverage](https://img.shields.io/coveralls/github/rav2040/dotenv?style=for-the-badge&logo=coveralls)](https://coveralls.io/github/rav2040/dotenv)
[![vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/rav2040/dotenv?style=for-the-badge&logo=snyk)](https://security.snyk.io/package/npm/@rav2040%2Fdotenv)
[![npm](https://img.shields.io/npm/v/@rav2040/dotenv?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@rav2040/dotenv)

## Installation

```sh
npm install -D @rav2040/dotenv
```

## Usage

With the following .env file in your project root:

```conf
FOO = "bar"
```

Create a new environment object (`process.env` will be left unchanged) by importing `createEnv`:

```js
import { createEnv } from "@rav2040/dotenv";
const Env = createEnv();
```

Variables become accessible via the following:

```js
const foo = Env.get("FOO"); // "bar"
const baz = Env.get("BAZ"); // undefined
```

You can set a variable as being required by passing `true` as the second argument:

```js
const foo = Env.get("FOO", true); // "bar"
const baz = Env.get("BAZ", true); // Throws an error
```

## JSON

Returned values will be parsed as JSON by default.

e.g. `FOO` is set to `42`:

```ts
const foo = Env.get<number>("FOO"); // 42
console.log(typeof foo); // "number"
```

e.g. `FOO` is set to `{"hello":"world"}`:

```ts
const foo = Env.get<{ hello: string }>("FOO"); // { hello: "world" }
console.log(typeof foo); // "object"
```

## Configuration

```js
const config = {
  // ...
};
const Env = createEnv(config);
```

### `path?: string`

Path of the environment file. If not set AND `.env` does not exist in the project root then only variables from `process.env` will be loaded. Otherwise variables from `process.env` and the environment file will be merged. Defaults to `.env` in the project root.

### `encoding?: BufferEncoding`

Buffer encoding of the environment file. Defaults to `"utf8"`.

### `override?: boolean`

Variables set in the environment file will take precedence over existing environment variables when there are conflicts. Defaults to `false`.

### `parseJson?: boolean`

Values that are valid JSON will be deserialized. Defaults to `true`.

## License

[MIT](https://github.com/rav2040/dotenv/blob/master/LICENSE)