open-index/open-npm huggingface dataset:
npm package: @se-oss/apr1
Description: Apache's APR1 MD5 password hashing for Node.js and browsers.
Author: Shahrad Elahi
Latest version: 1.0.0

<h1 align="center">
  <sup>@se-oss/apr1</sup>
  <br>
  <a href="https://github.com/shahradelahi/ts-apr1/actions/workflows/ci.yml"><img src="https://github.com/shahradelahi/ts-apr1/actions/workflows/ci.yml/badge.svg?branch=main&event=push" alt="CI"></a>
  <a href="https://www.npmjs.com/package/@se-oss/apr1"><img src="https://img.shields.io/npm/v/@se-oss/apr1.svg" alt="NPM Version"></a>
  <a href="/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat" alt="MIT License"></a>
  <a href="https://bundlephobia.com/package/@se-oss/apr1"><img src="https://img.shields.io/bundlephobia/minzip/@se-oss/apr1" alt="npm bundle size"></a>
  <a href="https://packagephobia.com/result?p=@se-oss/apr1"><img src="https://packagephobia.com/badge?p=@se-oss/apr1" alt="Install Size"></a>
</h1>

_@se-oss/apr1_ provides Apache's APR1 MD5 password hashing for Node.js and browsers, offering a lightweight and isomorphic solution for htpasswd-compatible authentication.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/apr1
```

<details>
<summary>Install using your favorite package manager</summary>

**pnpm**

```bash
pnpm install @se-oss/apr1
```

**yarn**

```bash
yarn add @se-oss/apr1
```

</details>

## 📖 Usage

### Generate Hash

Generate a secure APR1 hash for a password. If no salt is provided, a random 8-character salt is automatically generated.

```ts
import { generateApr1 } from '@se-oss/apr1';

// With automatic salt generation
const hash = generateApr1('my-password');
// $apr1$8x9z2p4n$L3...

// With specific salt
const saltedHash = generateApr1('my-password', 'Hl8aeGwd');
// $apr1$Hl8aeGwd$eu0KXh0r52OnPC/yzIzWF1
```

### Verify Hash

Verify if a plain-text password matches an existing APR1 hash using timing-safe comparison.

```ts
import { verifyApr1 } from '@se-oss/apr1';

const isValid = verifyApr1(
  'my-password',
  '$apr1$Hl8aeGwd$eu0KXh0r52OnPC/yzIzWF1'
);
console.log(isValid); // true
```

### Isomorphic Support

This library works seamlessly in both Node.js and modern browsers using `TextEncoder` and standard Uint8Array operations.

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/apr1).

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/ts-apr1).

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/ts-apr1/graphs/contributors).
npm package: @se-oss/assert
Description: A lightweight, type-safe assertion library based on @se-oss/is.
Author: Shahrad Elahi
Latest version: 1.0.0

# @se-oss/assert

[![CI](https://github.com/shahradelahi/assert/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/shahradelahi/assert/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/assert.svg)](https://www.npmjs.com/package/@se-oss/assert)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@se-oss/assert)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/assert)](https://packagephobia.com/result?p=@se-oss/assert)

_@se-oss/assert_ is a lightweight, type-safe assertion library for TypeScript and JavaScript, powered by [@se-oss/is](https://github.com/shahradelahi/is).

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/assert
```

<details>
<summary>Install using your favorite package manager</summary>

**pnpm**

```bash
pnpm install @se-oss/assert
```

**yarn**

```bash
yarn add @se-oss/assert
```

</details>

## 📖 Usage

_@se-oss/assert_ provides a set of assertion functions that throw a `TypeError` if the condition is not met. It is powered by [@se-oss/is](https://github.com/shahradelahi/is), so all predicates from `is` are available as assertions.

### Basic Example

```typescript
import { assert } from '@se-oss/assert';

// Throws if not a string
assert.string('hello');

// Throws with a custom message
assert.string(123, 'Value must be a string');
// => TypeError: Value must be a string
```

### Common Assertions

```typescript
// Numbers
assert.number(42);
assert.integer(42);
assert.positiveNumber(10);
assert.inRange(15, 'Not in range', [10, 20]);

// Objects & Arrays
assert.plainObject({ foo: 'bar' });
assert.array([1, 2, 3]);
assert.nonEmptyArray([1]);

// Strings
assert.nonEmptyString('hello');
assert.json('{"a":1}');
assert.ipv4('127.0.0.1');

// Logic
assert.truthy(true);
assert.falsy(false);
```

### Integration with TypeScript

The library is fully type-safe and provides type guards for your variables.

```typescript
function process(value: unknown) {
  assert.string(value);

  // 'value' is now narrowed to string
  console.log(value.toUpperCase());
}
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/assert).

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/assert)

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/assert/graphs/contributors).
npm package: @se-oss/base32
Description: A simple base32 (RFC 4648 and Crockford) encoder and decoder.
Author: Shahrad Elahi
Latest version: 1.0.0

# @se-oss/base32

[![CI](https://github.com/shahradelahi/base32/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/shahradelahi/base32/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/base32.svg)](https://www.npmjs.com/package/@se-oss/base32)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/base32)](https://packagephobia.com/result?p=@se-oss/base32)

A simple base32 encoder and decoder supporting both RFC 4648 and Crockford variants.

---

- [Installation](#-installation)
- [Usage](#-usage)
  - [RFC 4648](#rfc-4648)
  - [Crockford](#crockford)
- [Documentation](#-documentation)
- [Future Enhancements](#-future-enhancements)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
pnpm add @se-oss/base32
```

## 📖 Usage

### RFC 4648

```typescript
import { decode, encode } from '@se-oss/base32';

const encoded = encode('hello world');
console.log(encoded); // NBSWY3DPEB3W64TMMQ======

const decoded = decode(encoded);
console.log(new TextDecoder().decode(decoded)); // hello world
```

### Crockford

```typescript
import { crockfordDecode, crockfordEncode } from '@se-oss/base32';

const encoded = crockfordEncode('hello world');
console.log(encoded); // D1JPRV3F41VPYWKCCG======

const decoded = crockfordDecode(encoded);
console.log(new TextDecoder().decode(decoded)); // hello world
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/base32).

## 🚀 Future Enhancements

- [ ] Implement Crockford's checksum feature.

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/base32)

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/base32/graphs/contributors).
npm package: @se-oss/cidr-tools
Description: Tools to work with IPv4 and IPv6 CIDR.
Author: Shahrad Elahi
Latest version: 1.0.0

# @se-oss/cidr-tools

[![CI](https://github.com/shahradelahi/cidr-tools/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/shahradelahi/cidr-tools/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/cidr-tools.svg)](https://www.npmjs.com/package/@se-oss/cidr-tools)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@se-oss/cidr-tools)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/cidr-tools)](https://packagephobia.com/result?p=@se-oss/cidr-tools)

_@se-oss/cidr-tools_ is a library for working with CIDR blocks, IP addresses, and network ranges.

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
pnpm install @se-oss/cidr-tools
```

<details>
<summary>Install using your favorite package manager</summary>

**npm**

```bash
npm install @se-oss/cidr-tools
```

**yarn**

```bash
yarn add @se-oss/cidr-tools
```

</details>

## 📖 Usage

```typescript
import { contains, exclude, merge, overlap, parse } from '@se-oss/cidr-tools';

// Clean up and combine messy CIDR lists.
// `merge` takes an array of CIDRs and combines any that are adjacent or overlapping.
const messyCIDRs = ['1.0.0.0/24', '1.0.1.0/24', '10.0.0.0/16'];
const cleanCIDRs = merge(messyCIDRs);
//=> ['1.0.0.0/23', '10.0.0.0/16']

// Carve out a subnet from a larger network.
// `exclude` removes a list of CIDRs from a base list.
const network = ['10.0.0.0/16'];
const reserved = ['10.0.255.0/24'];
const available = exclude(network, reserved);
//=> ['10.0.0.0/17', '10.0.128.0/18', '10.0.192.0/19', '10.0.224.0/20', '10.0.240.0/21', '10.0.248.0/22', '10.0.252.0/23', '10.0.254.0/24']

// Check if a network contains a specific IP or subnet.
// `contains` is perfect for validating IP addresses against an access control list (ACL).
const allowedNetworks = ['192.168.1.0/24', '2001:db8::/64'];
const userIP = '192.168.1.100';
const isAllowed = contains(allowedNetworks, [userIP]);
//=> true

// See if two lists of networks have any overlap.
// Useful for detecting network configuration conflicts.
const productionVPC = ['10.1.0.0/16'];
const stagingVPC = ['10.1.128.0/17'];
const hasConflict = overlap(productionVPC, stagingVPC);
//=> true
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/cidr-tools).

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/cidr-tools).

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/cidr-tools/graphs/contributors).
npm package: @se-oss/circular-buffer
Description: Circular Buffer implementation for JavaScript
Author: Shahrad Elahi
Latest version: 1.0.2

# @se-oss/circular-buffer

[![CI](https://github.com/shahradelahi/circular-buffer/actions/workflows/ci.yml/badge.svg)](https://github.com/shahradelahi/circular-buffer/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/circular-buffer.svg)](https://www.npmjs.com/package/@se-oss/circular-buffer)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/circular-buffer)](https://packagephobia.com/result?p=@se-oss/circular-buffer)

A lightweight TypeScript implementation of a fixed-capacity [circular buffer](https://en.wikipedia.org/wiki/Circular_buffer), perfect for rolling windows, and efficient FIFO queues with automatic overwrite on full capacity.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm i @se-oss/circular-buffer
```

## 📖 Usage

```typescript
import { CircularBuffer } from '@se-oss/circular-buffer';

// Create a buffer with capacity for 5 items
const buf = new CircularBuffer(5);

// Add some numbers
buf.put(10);
buf.put(20);
buf.put(30);

// Check status
console.log(buf.isEmpty()); // false
console.log(buf.isFull()); // false
console.log(buf.size()); // 3

// Random access
console.log(buf.at(0)); // 10
console.log(buf.at(-1)); // 30

// Iterate in FIFO order
for (const num of buf) {
  console.log(num);
}
// → 10, 20, 30

// Overwrite when full
buf.put(40);
buf.put(50);
buf.put(60); // now full, this overwrites the oldest entry (10)

console.log(buf.toArray());
// → [20, 30, 40, 50, 60]

// Overwrite at gien index
buf.putAt(70, -2);
// → [20, 30, 40, 70, 60]

// Clear it
buf.clear();
console.log(buf.isEmpty()); // true
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/circular-buffer).

## 🔗 References

- [Wikipedia: Circular buffer](https://en.wikipedia.org/wiki/Circular_buffer)

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/circular-buffer).

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/circular-buffer/graphs/contributors).
npm package: @se-oss/deasync
Description: Native Node.js addon for synchronous async calls.
Author: Shahrad Elahi
Latest version: 1.0.1

# @se-oss/deasync

[![CI](https://github.com/shahradelahi/deasync/actions/workflows/CI.yml/badge.svg)](https://github.com/shahradelahi/deasync/actions/workflows/CI.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/deasync.svg)](https://www.npmjs.com/package/@se-oss/deasync)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/deasync)](https://packagephobia.com/result?p=@se-oss/deasync)

_@se-oss/deasync_ is a Node.js addon that enables synchronous execution of asynchronous functions by blocking the event loop. The core of project is written in Rust for performance and reliability.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [Credits](#-credits)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/deasync
```

## 📖 Usage

#### Wrapping an Asynchronous Function

`deasync` converts an asynchronous function with the conventional callback pattern `function(p1, ...pn, callback(error, result))` into a synchronous function. It returns the result and throws an error if one occurs.

```typescript
import { deasync } from '@se-oss/deasync';

function asyncFunction(input: string, callback: (err: any, result: string) => void) {
  setTimeout(() => {
    callback(null, `Hello, ${input}!`);
  }, 1000);
}

const syncFunction = deasync(asyncFunction);
console.log(syncFunction("World")); // Blocks for 1 second, then prints "Hello, World!"
```

#### Blocking Execution with `loopWhile`

Use `loopWhile(predicateFunc)` to block execution while the given predicate function returns `true`.

```typescript
import { sleep } from '@se-oss/deasync';
let done = false;

setTimeout(() => {
  done = true;
}, 1000);

loopWhile(() => !done);

// The task is now complete
```

#### Sleeping for a Fixed Duration

The sleep function blocks the current thread for the specified number of milliseconds. It behaves similarly to the [`Atomic.wait()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/wait) API.

```typescript
import { sleep } from '@se-oss/deasync';

console.log(Date.now(), 'Hello');
sleep(1000);
console.log(Date.now(), 'World!');
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/deasync).

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/deasync)

Thanks again for your support, it is much appreciated! 🙏

## 🙌 Credits

This project is inspired by [deasync](https://github.com/abbr/deasync), originally created by [Vladimir Kurchatkin](https://github.com/vkurchatkin) and later maintained by [@abbr](https://github.com/abbr).

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/deasync/graphs/contributors).
npm package: @se-oss/deasync-darwin-x64
Description: This is the **x86_64-apple-darwin** binary for `@se-oss/deasync`
Author: Shahrad Elahi
Latest version: 1.0.1

# `@se-oss/deasync-darwin-x64`

This is the **x86_64-apple-darwin** binary for `@se-oss/deasync`
npm package: @se-oss/deasync-linux-arm64-gnu
Description: This is the **aarch64-unknown-linux-gnu** binary for `@se-oss/deasync`
Latest version: 1.0.1

# `@se-oss/deasync-linux-arm64-gnu`

This is the **aarch64-unknown-linux-gnu** binary for `@se-oss/deasync`
npm package: @se-oss/deasync-linux-arm64-musl
Description: This is the **aarch64-unknown-linux-musl** binary for `@se-oss/deasync`
Latest version: 1.0.1

# `@se-oss/deasync-linux-arm64-musl`

This is the **aarch64-unknown-linux-musl** binary for `@se-oss/deasync`
npm package: @se-oss/deasync-linux-x64-gnu
Description: This is the **x86_64-unknown-linux-gnu** binary for `@se-oss/deasync`
Latest version: 1.0.1

# `@se-oss/deasync-linux-x64-gnu`

This is the **x86_64-unknown-linux-gnu** binary for `@se-oss/deasync`
npm package: @se-oss/deasync-linux-x64-musl
Description: This is the **x86_64-unknown-linux-musl** binary for `@se-oss/deasync`
Latest version: 1.0.1

# `@se-oss/deasync-linux-x64-musl`

This is the **x86_64-unknown-linux-musl** binary for `@se-oss/deasync`
npm package: @se-oss/deasync-win32-arm64-msvc
Description: This is the **aarch64-pc-windows-msvc** binary for `@se-oss/deasync`
Latest version: 1.0.1

# `@se-oss/deasync-win32-arm64-msvc`

This is the **aarch64-pc-windows-msvc** binary for `@se-oss/deasync`
npm package: @se-oss/deasync-win32-x64-msvc
Description: This is the **x86_64-pc-windows-msvc** binary for `@se-oss/deasync`
Latest version: 1.0.1

# `@se-oss/deasync-win32-x64-msvc`

This is the **x86_64-pc-windows-msvc** binary for `@se-oss/deasync`
npm package: @se-oss/debounce
Description: A simple and powerful debounce library for both synchronous and asynchronous functions.
Author: Shahrad Elahi
Latest version: 1.0.1

# @se-oss/debounce

[![CI](https://github.com/shahradelahi/ts-debounce/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/shahradelahi/ts-debounce/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/debounce.svg)](https://www.npmjs.com/package/@se-oss/debounce)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@se-oss/debounce)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/debounce)](https://packagephobia.com/result?p=@se-oss/debounce)

_@se-oss/debounce_ is a simple and powerful debounce library for both synchronous and asynchronous functions.

---

- [Installation](#-installation)
- [Usage](#-usage)
  - [Synchronous Function](#synchronous-function)
  - [Asynchronous Function](#asynchronous-function)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/debounce
```

<details>
<summary>Install using your favorite package manager</summary>

**pnpm**

```bash
pnpm install @se-oss/debounce
```

**yarn**

```bash
yarn add @se-oss/debounce
```

</details>

## 📖 Usage

The `debounce` function works with both synchronous and asynchronous functions. It automatically detects the function type and returns a debounced version with the appropriate behavior.

### Synchronous Function

Use `debounce` for synchronous functions.

```javascript
import { debounce } from '@se-oss/debounce';

function resize() {
  console.log('height', window.innerHeight);
  console.log('width', window.innerWidth);
}

window.onresize = debounce(resize, 200);
```

### Asynchronous Function

Use `debounce` for promise-returning or `async` functions.

```javascript
import { debounce } from '@se-oss/debounce';

const expensiveCall = async (input) => {
  // simulate network request
  await new Promise((resolve) => setTimeout(resolve, 100));
  return input;
};

const debouncedFunction = debounce(expensiveCall, 200);

for (const number of [1, 2, 3]) {
  (async () => {
    console.log(await debouncedFunction(number));
  })();
}
// => 3
// => 3
// => 3
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/debounce).

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/ts-debounce)

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/ts-debounce/graphs/contributors).
npm package: @se-oss/deep-clone
Description: A utility for deep cloning objects.
Author: Shahrad Elahi
Latest version: 1.1.0

# @se-oss/deep-clone

[![CI](https://github.com/shahradelahi/ts-deep-clone/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/shahradelahi/ts-deep-clone/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/deep-clone.svg)](https://www.npmjs.com/package/@se-oss/deep-clone)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@se-oss/deep-clone)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/deep-clone)](https://packagephobia.com/result?p=@se-oss/deep-clone)

_@se-oss/deep-clone_ is a utility for deeply cloning objects.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/deep-clone
```

<details>
<summary>Install using your favorite package manager</summary>

**pnpm**

```bash
pnpm install @se-oss/deep-clone
```

**yarn**

```bash
yarn add @se-oss/deep-clone
```

</details>

## 📖 Usage

### Basic Usage

```typescript
import { deepClone } from '@se-oss/deep-clone';

const original = {
  a: 1,
  b: { c: 2, d: new Date() },
  e: [3, { f: 4 }],
  g: /pattern/g,
};

const cloned = deepClone(original);

console.log(cloned !== original); // true
console.log(cloned.b !== original.b); // true
console.log(cloned.b.d !== original.b.d); // true (Date cloned)
```

### Circular References

```typescript
const obj: any = {};
obj.a = obj;

const cloned = deepClone(obj);

console.log(cloned !== obj); // true
console.log(cloned.a === cloned); // true
```

### Depth Limiting

```typescript
const nested = { a: { b: { c: 1 } } };

// Shallow clone (depth 0)
const shallow = deepClone(nested, { maxDepth: 0 });
console.log(shallow.a === nested.a); // true

// Clone 1 level deep
const oneLevel = deepClone(nested, { maxDepth: 1 });
console.log(oneLevel.a === nested.a); // false
console.log(oneLevel.a.b === nested.a.b); // true
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/deep-clone).

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/ts-deep-clone).

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/ts-deep-clone/graphs/contributors).
npm package: @se-oss/deep-freeze
Description: Recursively freezes objects and arrays to make them immutable, with TypeScript support.
Author: Shahrad Elahi
Latest version: 1.0.0

# @se-oss/deep-freeze

[![CI](https://github.com/shahradelahi/ts-deep-freeze/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/shahradelahi/ts-deep-freeze/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/deep-freeze.svg)](https://www.npmjs.com/package/@se-oss/deep-freeze)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@se-oss/deep-freeze)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/deep-freeze)](https://packagephobia.com/result?p=@se-oss/deep-freeze)

_@se-oss/deep-freeze_ is a utility for deep-freezing objects.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/deep-freeze
```

<details>
<summary>Install using your favorite package manager</summary>

**pnpm**

```bash
pnpm install @se-oss/deep-freeze
```

**yarn**

```bash
yarn add @se-oss/deep-freeze
```

</details>

## 📖 Usage

```typescript
import { deepFreeze } from '@se-oss/deep-freeze';

const obj = {
  a: 1,
  b: { c: 2 },
  d: [1, 2],
};

deepFreeze(obj);

// obj is now immutable:
// obj.a = 2; // Error
// obj.b.c = 3; // Error
// obj.d.push(3); // Error
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/deep-freeze).

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/ts-deep-freeze).

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/ts-deep-freeze/graphs/contributors).
npm package: @se-oss/deep-merge
Description: A utility for deep merging objects.
Author: Shahrad Elahi
Latest version: 1.1.0

# @se-oss/deep-merge

[![CI](https://github.com/shahradelahi/ts-deep-merge/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/shahradelahi/ts-deep-merge/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/deep-merge.svg)](https://www.npmjs.com/package/@se-oss/deep-merge)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@se-oss/deep-merge)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/deep-merge)](https://packagephobia.com/result?p=@se-oss/deep-merge)

_@se-oss/deep-merge_ is a utility for deep merging objects.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/deep-merge
```

<details>
<summary>Install using your favorite package manager</summary>

**pnpm**

```bash
pnpm install @se-oss/deep-merge
```

**yarn**

```bash
yarn add @se-oss/deep-merge
```

</details>

## 📖 Usage

```typescript
import { deepMerge } from '@se-oss/deep-merge';

const obj1 = { a: 1, b: { c: 2 }, d: [1, 2] };
const obj2 = { b: { e: 3 }, d: [3, 4], f: 5 };

deepMerge(obj1, obj2);
// => { a: 1, b: { c: 2, e: 3 }, d: [3, 4], f: 5 } (arrays are replaced by default)

deepMerge(obj1, obj2, { mergeArrays: true });
// => { a: 1, b: { c: 2, e: 3 }, d: [1, 2, 3, 4], f: 5 } (arrays are concatenated)

const obj3 = { date: new Date('2023-01-01') };
const obj4 = { date: new Date('2024-01-01'), other: 'value' };
deepMerge(obj3, obj4);
// => { date: [Date object from obj4], other: 'value' } (Date object is replaced)
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/deep-merge).

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/ts-deep-merge).

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/ts-deep-merge/graphs/contributors).
npm package: @se-oss/is
Description: Elegant and type-safe value validation library for TypeScript and JavaScript.
Author: Shahrad Elahi
Latest version: 1.0.0

# @se-oss/is

[![CI](https://github.com/shahradelahi/is/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/shahradelahi/is/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/is.svg)](https://www.npmjs.com/package/@se-oss/is)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@se-oss/is)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/is)](https://packagephobia.com/result?p=@se-oss/is)

_@se-oss/is_ is an elegant and type-safe value validation library for TypeScript and JavaScript.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/is
```

<details>
<summary>Install using your favorite package manager</summary>

**pnpm**

```bash
pnpm install @se-oss/is
```

**yarn**

```bash
yarn add @se-oss/is
```

</details>

## 📖 Usage

### Basic validation

```typescript
import is from '@se-oss/is';

is.string('☕');
//=> true

is.number(42);
//=> true

is.array([1, 2, 3]);
//=> true

is.urlInstance(new URL('https://example.com'));
//=> true
```

### Type detection

```typescript
import is from '@se-oss/is';

is('hello');
//=> 'string'

is(new Map());
//=> 'Map'

is(new Uint8Array());
//=> 'Uint8Array'
```

### Type narrowing

```typescript
import is from '@se-oss/is';

const value: unknown = '☕';

if (is.string(value)) {
  console.log(value.length);
  //=> 2
}
```

### Logical operators

```typescript
import is from '@se-oss/is';

// Check if any of the predicates match
is.any([is.string, is.number], 'hello');
//=> true

// Check if all of the predicates match
is.all([is.array, is.nonEmptyArray], [1, 2, 3]);
//=> true

// Check if a value is optional
is.optional(undefined, is.string);
//=> true

// Use as predicate factories
const isStringOrNumber = is.any([is.string, is.number]);
isStringOrNumber('hello');
//=> true
```

### Advanced usage

```typescript
import is from '@se-oss/is';

// Validate array elements
is.array([1, 2, 3], is.number);
//=> true

// Check if a number is in range
is.inRange(3, [0, 5]);
//=> true

// Check for plain objects
is.plainObject({ a: 1 });
//=> true
```

### Web & String validation

```typescript
import is from '@se-oss/is';

is.json('{"a":1}');
//=> true

is.base64('SGVsbG8gd29ybGQ=');
//=> true

is.ipv4('127.0.0.1');
//=> true

is.hexColor('#ffffff');
//=> true
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/is).

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/is)

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/is/graphs/contributors).
npm package: @se-oss/msgpack
Description: Encode objects and buffers to base64 MessagePack and decode them back with ease.
Author: Shahrad Elahi
Latest version: 1.0.0

# @se-oss/msgpack

[![CI](https://github.com/shahradelahi/msgpack/actions/workflows/ci.yml/badge.svg)](https://github.com/shahradelahi/msgpack/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/msgpack.svg)](https://www.npmjs.com/package/@se-oss/msgpack)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/msgpack)](https://packagephobia.com/result?p=@se-oss/msgpack)

A lightweight utility for encoding objects and buffers into base64 MessagePack and decoding them back to their original form. Provides seamless conversion between JSON and MessagePack, with support for custom encoding and decoding options.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/msgpack
```

## 📖 Usage

```typescript
import { MSGPack } from '@se-oss/msgpack';

// Basic usage example to stringify object to Base64
const obj = { hello: 'world', numbers: [1, 2, 3], nested: { a: 1, b: 2 } };
const encoded = MSGPack.stringify(obj);
console.log('Encoded:', encoded);

const decoded = MSGPack.parse(encoded);
console.log('Decoded:', decoded);

// Using with custom options
const customEncoded = MSGPack.stringify(obj, {
  maxDepth: 3,
  ignoreUndefined: true,
});
console.log('Custom encoded:', customEncoded);
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/msgpack).

##### API

<!-- prettier-ignore -->
```typescript
class MSGPack {
  /**
   * Parses a base64 encoded string into its original form.
   *
   * @param input - A base64 encoded string to be parsed.
   * @param options - Optional decoder options for the msgpack decode function.
   * @returns The decoded object or value.
   * @throws {TypeError} If the input is not a valid base64 encoded string.
   */
  static parse(input: string, options?: Partial<DecoderOptions>): unknown;

  /**
   * Stringifies an object or value into a base64 encoded string.
   *
   * @param {ObjectLike} input - An object or value to be stringified.
   * @param options - Optional encoder options for the msgpack encode function.
   * @returns A base64 encoded string representing the input object or value.
   * @throws {TypeError} If the input is not an object.
   */
  static stringify(input: ObjectLike, options?: Partial<EncoderOptions> ): string;
}
```

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/msgpack)

Thanks again for your support, it is much appreciated! 🙏

## Relevant

- [MessagePack](https://msgpack.org/)
- [@msgpack/msgpack](https://github.com/msgpack/msgpack-javascript)

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/msgpack/graphs/contributors).
npm package: @se-oss/rand
Description: A utility library for generating random strings, numbers and UUIDs.
Author: Shahrad Elahi
Latest version: 1.1.0

# @se-oss/rand

[![CI](https://github.com/shahradelahi/rand/actions/workflows/ci.yml/badge.svg)](https://github.com/shahradelahi/rand/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/rand.svg)](https://www.npmjs.com/package/@se-oss/rand)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/rand)](https://packagephobia.com/result?p=@se-oss/rand)

This library provides functions for generating random strings and numbers in various formats, including Base10, Base36, Base62, UUIDv4, and random numbers within specified ranges or lengths.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
pnpm i @se-oss/rand
```

## 📖 Usage

```typescript
import * as rnd from '@se-oss/rand';

// Generate a random Base62 string of length 12
console.log(rnd.randomBase62(12)); // Example output: 'A1b2C3d4E5f6'

// Generate a random Base36 string of length 8
console.log(rnd.randomBase36(8)); // Example output: '1a2b3c4d'

// Generate a random Base10 string of length 4
console.log(rnd.randomBase10(4)); // Example output: '5678'

// Generate a random UUIDv4 string
console.log(rnd.randomUuidv4()); // Example output: 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6'

// Generate a random number between 1 and 10
console.log(rnd.randomNumber(1, 10)); // Example output: 5

// Generate a random number of length 16
console.log(rnd.randomNumber(16)); // Example output: 8933580352864351
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/rand).

##### API

```typescript
// Generates a random string of a specified length using the provided characters.
function random(chars: string, length: number): string;

// Generates a random string of a specified length using Base62 characters (A-Z, a-z, 0-9).
function randomBase62(length: number): string;

// Generates a random string of a specified length using Base36 characters (a-z, 0-9).
function randomBase36(length: number): string;

// Generates a random string of a specified length using Base10 characters (0-9).
function randomBase10(length: number): string;

// Generates a random UUIDv4 string.
function randomUuidv4(): string;

// Generates a random number within a specified range or of a specified length.
function randomNumber(min: number, max: number): number;
function randomNumber(length: number): number;
```

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/rand).

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/rand/graphs/contributors).
npm package: @se-oss/range-parser
Description: Lightweight HTTP Range header parser.
Author: Shahrad Elahi
Latest version: 1.0.0

# @se-oss/range-parser

[![CI](https://github.com/shahradelahi/http-range-parser/actions/workflows/ci.yml/badge.svg)](https://github.com/shahradelahi/http-range-parser/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/@se-oss/range-parser.svg)](https://www.npmjs.com/package/@se-oss/range-parser)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](/LICENSE)
[![Install Size](https://packagephobia.com/badge?p=@se-oss/range-parser)](https://packagephobia.com/result?p=@se-oss/range-parser)

_@se-oss/range-parser_ is a lightweight, fast parser for [HTTP Range headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Range_requests). It supports multi-range requests, range combination.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [Credits](#-credits)
- [License](#license)

## 📦 Installation

```bash
npm i @se-oss/range-parser
```

## 📖 Usage

```typescript
import { parseRange } from '@se-oss/range-parser';

const size = 1000;
const str = 'bytes=500-999';
console.log(parseRange(size, str));
// [ { start: 500, end: 999 }, type: 'bytes' ]

const multi = 'bytes=0-4,90-99,5-75,100-199,101-102';
console.log(parse(150, multi, { combine: true }));
// [ { start: 0, end: 75 }, { start: 90, end: 149 }, type: 'bytes' ]
```

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/range-parser).

##### API

<!-- prettier-ignore -->
```typescript
/**
 * Parse "Range" header `str` relative to the given file `size`.
 *
 * @param size - The size of the file.
 * @param str - The Range header string.
 * @param options - Optional configuration.
 * @returns Array of ranges if valid, -1 for unsatisfiable ranges, or -2 for malformed header.
 */
declare function parseRange(size: number, str: string, options?: RangeParserOptions): RangeArray | -1 | -2;
```

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/http-range-parser).

Thanks again for your support, it is much appreciated! 🙏

## 🙌 Credits

This package is a [TypeScript](https://www.typescriptlang.org/) port of [jshttp/range-parser](https://github.com/jshttp/range-parser/) with support for both [CommonJS](https://nodejs.org/api/modules.html) and [ECMAScript](https://nodejs.org/api/esm.html) modules.

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/http-range-parser/graphs/contributors).
npm package: @se-oss/regexp-escape
Description: Isomorphic Stage 4 RegExp.escape polyfill
Author: Shahrad Elahi
Latest version: 1.0.0

<h1 align="center">
  <sup>@se-oss/regexp-escape</sup>
  <br>
  <a href="https://github.com/shahradelahi/ts-regexp-escape/actions/workflows/ci.yml"><img src="https://github.com/shahradelahi/ts-regexp-escape/actions/workflows/ci.yml/badge.svg?branch=main&event=push" alt="CI"></a>
  <a href="https://www.npmjs.com/package/@se-oss/regexp-escape"><img src="https://img.shields.io/npm/v/@se-oss/regexp-escape.svg" alt="NPM Version"></a>
  <a href="/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat" alt="MIT License"></a>
  <a href="https://bundlephobia.com/package/@se-oss/regexp-escape"><img src="https://img.shields.io/bundlephobia/minzip/@se-oss/regexp-escape" alt="npm bundle size"></a>
  <a href="https://packagephobia.com/result?p=@se-oss/regexp-escape"><img src="https://packagephobia.com/badge?p=@se-oss/regexp-escape" alt="Install Size"></a>
</h1>

_@se-oss/regexp-escape_ is an isomorphic Stage 4 `RegExp.escape` polyfill that brings the latest TC39 specification to your environment today.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Performance](#-performance)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/regexp-escape
```

<details>
<summary>Install using your favorite package manager</summary>

**pnpm**

```bash
pnpm install @se-oss/regexp-escape
```

**yarn**

```bash
yarn add @se-oss/regexp-escape
```

</details>

## 📖 Usage

### Ponyfill

Import and use directly without modifying globals:

```typescript
import escape from '@se-oss/regexp-escape';

const escaped = escape('a.b*c');
console.log(escaped); // "\\x61\\x2eb\\*c"
```

### Polyfill

Automatically patch the native `RegExp` object:

```typescript
import '@se-oss/regexp-escape/polyfill';

// Now available globally
const escaped = RegExp.escape('a.b*c');
```

## 📚 Documentation

For more information, please see the [TC39 RegExp.escape proposal](https://github.com/tc39/proposal-regexp-escape) or the [API docs](https://www.jsdocs.io/package/@se-oss/regexp-escape).

## 🚀 Performance

| Library                                | Operations/sec |
| -------------------------------------- | -------------- |
| Native                                 | ~813,507       |
| **@se-oss/regexp-escape** (isomorphic) | ~790,797       |
| **@se-oss/regexp-escape** (pollyfill)  | ~177,705       |
| regexp.escape                          | ~41,153        |

_Benchmark script: [`bench/index.bench.ts`](bench/index.bench.ts)_

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/ts-regexp-escape).

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/ts-regexp-escape/graphs/contributors).
npm package: @se-oss/sha1
Description: Isomorphic SHA-1 hashing library for Node.js and browsers.
Author: Shahrad Elahi
Latest version: 1.0.0

<h1 align="center">
  <sup>@se-oss/sha1</sup>
  <br>
  <a href="https://github.com/shahradelahi/ts-sha1/actions/workflows/ci.yml"><img src="https://github.com/shahradelahi/ts-sha1/actions/workflows/ci.yml/badge.svg?branch=main&event=push" alt="CI"></a>
  <a href="https://www.npmjs.com/package/@se-oss/sha1"><img src="https://img.shields.io/npm/v/@se-oss/sha1.svg" alt="NPM Version"></a>
  <a href="/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat" alt="MIT License"></a>
  <a href="https://bundlephobia.com/package/@se-oss/sha1"><img src="https://img.shields.io/bundlephobia/minzip/@se-oss/sha1" alt="npm bundle size"></a>
  <a href="https://packagephobia.com/result?p=@se-oss/sha1"><img src="https://packagephobia.com/badge?p=@se-oss/sha1" alt="Install Size"></a>
</h1>

_@se-oss/sha1_ is an isomorphic SHA-1 hashing library that automatically leverages native performance in Node.js while providing a robust pure-JS fallback for browsers.

---

- [Installation](#-installation)
- [Usage](#-usage)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npm install @se-oss/sha1
```

<details>
<summary>Install using your favorite package manager</summary>

**pnpm**

```bash
pnpm install @se-oss/sha1
```

**yarn**

```bash
yarn add @se-oss/sha1
```

</details>

## 📖 Usage

### Basic Usage

Calculate the SHA-1 hash of a string. Returns a `Uint8Array`.

```ts
import { sha1 } from '@se-oss/sha1';

const hash = sha1('password');
// Uint8Array(20) [ 91, 170, 97, 228, ... ]
```

### Buffer Input

Support for `Uint8Array` or `Buffer` as input.

```ts
import { sha1 } from '@se-oss/sha1';

const data = new TextEncoder().encode('hello world');
const hash = sha1(data);
```

### Isomorphic Behavior

The library detects the environment and switches implementations automatically:

- **Node.js**: Uses `node:crypto` for hardware-accelerated performance.
- **Browsers/Edge**: Uses a pure JavaScript implementation.

## 📚 Documentation

For all configuration options, please see [the API docs](https://www.jsdocs.io/package/@se-oss/sha1).

## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/ts-sha1).

Thanks again for your support, it is much appreciated! 🙏

## License

[MIT](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) and [contributors](https://github.com/shahradelahi/ts-sha1/graphs/contributors).