open-index/open-npm huggingface dataset:
npm package: @quentinadam/array-extension
Description: A library of Array extension functions
Author: Quentin Adam
Latest version: 0.1.6

# @quentinadam/array-extension

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A library of Array extension functions.

## Usage

```ts
import ArrayExtension from '@quentinadam/array-extension';

type T = { key: string; value: number | undefined };

const array: T[] = [
  { key: 'temperature', value: 10 },
  { key: 'pressure', value: 1013 },
  { key: 'humidity', value: undefined },
];

type U = { key: string; value: number };

const mappedArray: U[] = new ArrayExtension(array).mapFilter(({ key, value }) => {
  if (value !== undefined) {
    return { key, value };
  } else {
    return undefined;
  }
});
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-array-extension/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-array-extension/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/array-extension.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/array-extension
[jsr-image]: https://jsr.io/badges/@quentinadam/array-extension?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/array-extension
npm package: @quentinadam/assert
Description: A simple assertion function
Author: Quentin Adam
Latest version: 0.1.17

# @quentinadam/assert

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple assertion function.

## Usage

```ts
import assert from '@quentinadam/assert';

assert(true); // doesn't throw

assert(false); // throws an AssertionError

assert(false, 'message'); // throws an AssertionError with a custom error message

assert(false, new Error('message')); // throws a custom Error

const value: string | undefined = 'hello';
assert(value !== undefined); // narrows the type of value to string;
value.toUpperCase(); // works
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-assert/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-assert/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/assert.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/assert
[jsr-image]: https://jsr.io/badges/@quentinadam/assert?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/assert
npm package: @quentinadam/base32
Description: A simple library to encode and decode base32 strings
Author: Quentin Adam
Latest version: 0.1.11

# @quentinadam/base32

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple library to encode and decode base32 strings.

Optionnaly supports specifying the alphabet to use.

## Usage

```ts
import * as base32 from '@quentinadam/base32';

base32.encode(new Uint8Array([102, 111, 111])); // returns 'MZXW6==='

base32.decode('MZXW6==='); // returns Uint8Array([102, 111, 111])

base32.encode(new Uint8Array([102, 111, 111]), { padding: false }); // returns 'MZXW6'
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-base32/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-base32/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/base32.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/base32
[jsr-image]: https://jsr.io/badges/@quentinadam/base32?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/base32
npm package: @quentinadam/base58
Description: A simple library to encode and decode base58 strings
Author: Quentin Adam
Latest version: 0.1.12

# @quentinadam/base58

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple library to encode and decode base58 strings.

Optionnaly supports specifying the alphabet to use.

## Usage

```ts
import * as base58 from '@quentinadam/base58';

base58.encode(new Uint8Array([72, 101, 108, 108, 111])); // returns '9Ajdvzr'

base58.decode('9Ajdvzr'); // returns Uint8Array([72, 101, 108, 108, 111])
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-base58/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-base58/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/base58.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/base58
[jsr-image]: https://jsr.io/badges/@quentinadam/base58?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/base58
npm package: @quentinadam/base58check
Description: A simple library to encode and decode base58check strings
Author: Quentin Adam
Latest version: 0.1.13

# @quentinadam/base58check

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple library to encode and decode base58check strings.

Optionnaly supports specifying the alphabet to use.

## Usage

```ts
import * as base58check from '@quentinadam/base58check';

base58check.encode(new Uint8Array([72, 101, 108, 108, 111])); // returns 'vSxRbq6XzDhP'

base58check.decode('vSxRbq6XzDhP'); // returns Uint8Array([72, 101, 108, 108, 111])
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-base58check/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-base58check/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/base58check.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/base58check
[jsr-image]: https://jsr.io/badges/@quentinadam/base58check?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/base58check
npm package: @quentinadam/base64
Description: A simple library to encode and decode base64 strings
Author: Quentin Adam
Latest version: 0.1.11

# @quentinadam/base64

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple library to encode and decode base64 strings.

Optionnaly supports specifying the alphabet to use.

## Usage

```ts
import * as base64 from '@quentinadam/base64';

base64.encode(new Uint8Array([102, 111, 111, 98])); // returns 'Zm9vYg=='

base64.decode('Zm9vYg=='); // returns Uint8Array([102, 111, 111, 98])

base64.encode(new Uint8Array([102, 111, 111, 98]), { padding: false }); // returns 'Zm9vYg'
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-base64/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-base64/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/base64.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/base64
[jsr-image]: https://jsr.io/badges/@quentinadam/base64?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/base64
npm package: @quentinadam/decimal
Description: A library for working with arbitrary precision decimal numbers
Author: Quentin Adam
Latest version: 0.1.17

# @quentinadam/decimal

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A library for working with arbitrary precision decimal numbers.

Decimal numbers are represented by a mantissa (bigint) and an exponent (number). Instances of the Decimal class are
immutable; calling functions (like `abs`, `add`, `ceil`, ...) on an instance will return a new Decimal instance with the
result. Division may fail if the resulting number cannot be represented with a fixed number of decimals (like 1/3).
Please check the documentation of the `div` function for more details.

## Usage

```ts
import Decimal from '@quentinadam/decimal';

const a = Decimal.from('1.11111111111111111111');

const b = a.mul(2);

console.log(b.toString()); // prints 2.22222222222222222222

const c = a.add(b);

console.log(c.toString()); // prints 3.33333333333333333333
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-decimal/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-decimal/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/decimal.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/decimal
[jsr-image]: https://jsr.io/badges/@quentinadam/decimal?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/decimal
npm package: @quentinadam/ensure
Description: A simple function that asserts that a value is not undefined or null and returns the narrowed value
Author: Quentin Adam
Latest version: 0.1.5

# @quentinadam/ensure

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple function that asserts that a value is not undefined or null and returns the narrowed value.

## Usage

```ts
import ensure from '@quentinadam/ensure';

const a = ensure(1); // doesn't throw

const b = ensure(undefined); // throws an AssertionError

ensure(undefined, 'message'); // throws an AssertionError with a custom error message

ensure(undefined, new Error('message')); // throws a custom Error

const value: string | undefined = 'hello';
const narrowedValue = ensure(value); // narrows the type of value to string;
value.toUpperCase(); // works
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-ensure/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-ensure/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/ensure.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/ensure
[jsr-image]: https://jsr.io/badges/@quentinadam/ensure?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/ensure
npm package: @quentinadam/event-emitter
Description: A simple class to handle emitting and listening to strongly typed events
Author: Quentin Adam
Latest version: 0.1.6

# @quentinadam/event-emitter

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple class to handle emitting and listening to strongly typed events.

## Usage

```ts
import EventEmitter from '@quentinadam/event-emitter';

const onUpdate = new EventEmitter<[value: number]>();

//add listener
const listener = onUpdate.addListener((value) => {
  console.log('value updated', value);
});

//emit
onUpdate.emit(17);

//remove listener
onUpdate.removeListener(listener);
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-event-emitter/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-event-emitter/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/event-emitter.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/event-emitter
[jsr-image]: https://jsr.io/badges/@quentinadam/event-emitter?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/event-emitter
npm package: @quentinadam/evm
Description: EVM library
Author: Quentin Adam
Latest version: 0.1.11

# @quentinadam/evm

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

EVM library.

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-evm/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-evm/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/evm.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/evm
[jsr-image]: https://jsr.io/badges/@quentinadam/evm?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/evm
npm package: @quentinadam/evm-base
Description: EVM base library
Author: Quentin Adam
Latest version: 0.1.14

# @quentinadam/evm-base

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

EVM base library.

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-evm-base/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-evm-base/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/evm-base.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/evm-base
[jsr-image]: https://jsr.io/badges/@quentinadam/evm-base?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/evm-base
npm package: @quentinadam/hash
Description: A simple hash library that wraps jsr:@noble/hashes
Author: Quentin Adam
Latest version: 0.1.12

# @quentinadam/hash

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple hash library that wraps [jsr:@noble/hashes](https://jsr.io/@noble/hashes).

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-hash/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-hash/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/hash.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/hash
[jsr-image]: https://jsr.io/badges/@quentinadam/hash?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/hash
npm package: @quentinadam/hex
Description: A simple library to encode and decode hex strings
Author: Quentin Adam
Latest version: 0.1.8

# @quentinadam/hex

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple library to encode and decode hex strings.

## Usage

```ts
import * as hex from '@quentinadam/hex';

hex.decode('000102'); // returns Uint8Array([0, 1, 2])

hex.encode(new Uint8Array([0, 1, 2])); // returns '000102'
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-hex/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-hex/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/hex.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/hex
[jsr-image]: https://jsr.io/badges/@quentinadam/hex?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/hex
npm package: @quentinadam/require
Description: A simple function that returns and requires that a value is not undefined or null
Author: Quentin Adam
Latest version: 0.1.4

# @quentinadam/require

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple function that returns and requires that a value is not undefined or null.

## Usage

```ts
import require from '@quentinadam/require';

const a = require(1); // doesn't throw

const b = require(undefined); // throws an AssertionError

require(undefined, 'message'); // throws an AssertionError with a custom error message

require(undefined, new Error('message')); // throws a custom Error

const value: string | undefined = 'hello';
const narrowedValue = require(value); // narrows the type of value to string;
value.toUpperCase(); // works
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-require/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-require/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/require.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/require
[jsr-image]: https://jsr.io/badges/@quentinadam/require?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/require
npm package: @quentinadam/rlp
Description: A simple library to encode data using the Recursive Length Prefix (RLP) encoding scheme, commonly used in Ethereum
Author: Quentin Adam
Latest version: 0.1.0

# @quentinadam/rlp

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple library to encode data using the Recursive Length Prefix (RLP) encoding scheme, commonly used in Ethereum.

## Usage

```ts
import * as rlp from '@quentinadam/rlp';

rlp.encode([0x11, new Uint8Array([0x22, 0x33])]); // returns new Uint8Array([ 0xc4, 0x11, 0x82, 0x22, 0x33 ])
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-rlp/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-rlp/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/rlp.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/rlp
[jsr-image]: https://jsr.io/badges/@quentinadam/rlp?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/rlp
npm package: @quentinadam/secp256k1
Description: A simple secp256k1 library that wraps jsr:@noble/secp256k1
Author: Quentin Adam
Latest version: 0.1.3

# @quentinadam/secp256k1

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple secp256k1 library that wraps [jsr:@noble/secp256k1](https://jsr.io/@noble/secp256k1).

## Usage

```ts
import * as secp256k1 from '@quentinadam/secp256k1';

const privateKey = randomPrivateKey();
const hash = new Uint8Array(32);

const { r, s, recovery } = secp256k1.sign(hash, privateKey);
```

```ts
import { PrivateKey } from '@quentinadam/secp256k1';

const privateKey = PrivateKey.random();
const hash = new Uint8Array(32);

const { r, s, recovery } = privateKey.sign(hash);
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-secp256k1/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-secp256k1/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/secp256k1.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/secp256k1
[jsr-image]: https://jsr.io/badges/@quentinadam/secp256k1?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/secp256k1
npm package: @quentinadam/tvm
Description: TVM library
Author: Quentin Adam
Latest version: 0.1.12

# @quentinadam/tvm

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

TVM library.

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-tvm/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-tvm/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/tvm.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/tvm
[jsr-image]: https://jsr.io/badges/@quentinadam/tvm?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/tvm
npm package: @quentinadam/uint8array-extension
Description: A library of Uint8Array extension functions
Author: Quentin Adam
Latest version: 0.1.13

# @quentinadam/uint8array-extension

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A library of Uint8Array extension functions.

## Usage

```ts
import Uint8ArrayExtension from '@quentinadam/uint8array-extension';

const a = Uint8ArrayExtension.fromUint32BE(1000);
console.log(a); // Uint8Array [ 0, 0, 3, 232 ]

const b = new Uint8ArrayExtension(a).getUint32BE(0);
console.log(b); // 1000

new Uint8ArrayExtension(a).setUint16BE(0, 1000);
console.log(a); // Uint8Array [ 3, 232, 3, 232 ]

const c = new Uint8ArrayExtension(a).padStart(8);
console.log(c); // Uint8Array [ 0, 0, 0, 0, 3, 232, 3, 232 ]

const d = Uint8ArrayExtension.concat([new Uint8Array([1, 2]), new Uint8Array([3, 4])]);
console.log(d); // Uint8Array [ 1, 2, 3, 4 ]
```

```ts
import concat from '@quentinadam/uint8array-extension/concat';

const a = concat([new Uint8Array([1, 2]), new Uint8Array([3, 4])]);
console.log(a); // Uint8Array [ 1, 2, 3, 4 ]
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-uint8array-extension/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-uint8array-extension/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/uint8array-extension.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/uint8array-extension
[jsr-image]: https://jsr.io/badges/@quentinadam/uint8array-extension?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/uint8array-extension
npm package: @quentinadam/unreachable
Description: A simple library to assert unreachable code paths
Author: Quentin Adam
Latest version: 0.1.1

# @quentinadam/unreachable

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple library to assert unreachable code paths.

`unreachable` is meant for exhaustive checks. At compile time, TypeScript only accepts calls where the value has been
narrowed to `never` (no possible value left). If it is still reached at runtime, it throws an `AssertionError`.

## Usage

```ts
import unreachable from '@quentinadam/unreachable';

function transform(value: number | string) {
  if (typeof value === 'number') {
    return value * 2;
  }
  if (typeof value === 'string') {
    return value.toUpperCase();
  }
  return unreachable(value);
}
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-unreachable/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-unreachable/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/unreachable.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/unreachable
[jsr-image]: https://jsr.io/badges/@quentinadam/unreachable?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/unreachable
npm package: @quentinadam/uuidv7
Description: A simple UUIDv7 generation function
Author: Quentin Adam
Latest version: 0.1.8

# @quentinadam/uuidv7

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple UUIDv7 generation function.

## Usage

```ts
import generateUUIDv7 from '@quentinadam/uuidv7';

console.log(generateUUIDv7()); // generate a UUIDv7 based on the current time

console.log(generateUUIDv7(new Date('2024-01-01'))); // generate a UUIDv7 based on a specific time
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-uuidv7/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-uuidv7/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/uuidv7.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/uuidv7
[jsr-image]: https://jsr.io/badges/@quentinadam/uuidv7?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/uuidv7
npm package: @quentinadam/zip
Description: A library for creating and extracting ZIP archives
Author: Quentin Adam
Latest version: 0.1.13

# @quentinadam/zip

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A library for creating and extracting ZIP archives.

## Usage

```ts
import * as zip from '@quentinadam/zip';

const files = [
  { name: 'hello.txt', data: new TextEncoder().encode('hello world') },
  { name: 'ipsum/lorem.txt', data: new TextEncoder().encode('ipsum lorem') },
];

const buffer = await zip.create(files);

for (const { name, data } of await zip.extract(buffer)) {
  console.log(name, new TextDecoder().decode(data));
}
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-zip/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-zip/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/zip.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/zip
[jsr-image]: https://jsr.io/badges/@quentinadam/zip?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/zip
npm package: @quentinadam/zod
Description: A simple library to parse data, inspired by zod
Author: Quentin Adam
Latest version: 0.1.14

# @quentinadam/zod

[![JSR][jsr-image]][jsr-url] [![NPM][npm-image]][npm-url] [![CI][ci-image]][ci-url]

A simple library to parse data, inspired by [https://zod.dev/](zod).

## Usage

```ts
import * as z from '@quentinadam/zod';

const data: unknown = { age: 30, name: 'John', email: 'john@example.com' };

const schema: z.Schema<{ age: number; name: string }> = z.object({ age: z.number(), name: z.string() });

const parsed: { age: number; name: string } = schema.parse(data);
```

[ci-image]: https://img.shields.io/github/actions/workflow/status/quentinadam/deno-zod/ci.yml?branch=main&logo=github&style=flat-square
[ci-url]: https://github.com/quentinadam/deno-zod/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/@quentinadam/zod.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@quentinadam/zod
[jsr-image]: https://jsr.io/badges/@quentinadam/zod?style=flat-square
[jsr-url]: https://jsr.io/@quentinadam/zod