open-index/open-npm huggingface dataset:
npm package: @huse/action-pending
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Action Pending   path: /action-pending order: 1 ---
Latest version: 1.1.2

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Action Pending
  path: /action-pending
order: 1
---

# Action Pending

Hooks to encapsulate async function with pending states.

```shell
npm install @huse/action-pending
```
npm package: @huse/boolean
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Boolean   path: /boolean order: 1 ---
Latest version: 1.2.0

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Boolean
  path: /boolean
order: 1
---

# Boolean

Provides hooks to work with `boolean` primitive type.

```shell
npm install @huse/boolean
```
npm package: @huse/click-outside
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Click Outside   path: /click-outside order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Click Outside
  path: /click-outside
order: 1
---

# Click Outside

Listen for clicks in document and trigger a callback when it happens outside an element.

```shell
npm install @huse/click-outside
```
npm package: @huse/collection
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Collection   path: /collection order: 1 ---
Latest version: 1.1.2

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Collection
  path: /collection
order: 1
---

# Collection

Hooks to manage and mutate collection types.

```shell
npm install @huse/collection
```
npm package: @huse/debounce
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Debounce   path: /debounce order: 1 ---
Latest version: 1.1.2

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Debounce
  path: /debounce
order: 1
---

# Debounce

Provides hooks to debounce value changes, effects or callbacks.

```shell
npm install @huse/debounce
```
npm package: @huse/debug
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Debug   path: /debug order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Debug
  path: /debug
order: 1
---

# Debug

A set of hooks for debugging component.

Since this package is for debugging, we will not consider the size of package as an important factor, please remember to remove all debug hooks in production.

```shell
npm install @huse/debug
```
npm package: @huse/derived-state
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Derived State   path: /derived-state order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Derived State
  path: /derived-state
order: 1
---

# Derived State

Derive a value from input.

```shell
npm install @huse/derived-state
```
npm package: @huse/document-event
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Document Event   path: /document-event order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Document Event
  path: /document-event
order: 1
---

# Document Event

Register event listeners on `document`.

```shell
npm install @huse/document-event
```
npm package: @huse/document-title
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Document Title   path: /document-title order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Document Title
  path: /document-title
order: 1
---

# Document Title

Change `document.title` to given value.

```shell
npm install @huse/document-title
```
npm package: @huse/effect-ref
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Effect Ref   path: /effect-ref order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Effect Ref
  path: /effect-ref
order: 1
---

# Effect Ref

Makes a [callback ref](https://zh-hans.reactjs.org/docs/refs-and-the-dom.html#callback-refs) behaves like effects.

```shell
npm install @huse/effect-ref
```
npm package: @huse/element-size
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Element Size   path: /element-size order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Element Size
  path: /element-size
order: 1
---

# Element Size

Hooks related to observing element size.

```shell
npm install @huse/element-size
```
npm package: @huse/hover
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Hover   path: /hover order: 1 ---
Latest version: 1.1.3

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Hover
  path: /hover
order: 1
---

# Hover

Provides a hook to observe whether element is in hover state.

```shell
npm install @huse/hover
```
npm package: @huse/immer
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Immer   path: /immer order: 1 ---
Latest version: 2.1.3

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Immer
  path: /immer
order: 1
---

# Immer

**DEPRECATED: This package is depreacted in favor of [the offficial use-immer package](https://github.com/immerjs/use-immer).**

Provides reducer and state hooks bound to [immer](https://github.com/immerjs/immer) library.

```shell
npm install @huse/immer
```
npm package: @huse/infinite-scroll
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Infinite Scroll   path: /infinite-scroll order: 1 ---
Latest version: 1.2.2

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Infinite Scroll
  path: /infinite-scroll
order: 1
---

# Infinite Scroll

Provides hooks to work with scroll-to-load cases.

```shell
npm install @huse/infinite-scroll
```
npm package: @huse/input-value
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Input Value   path: /input-value order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Input Value
  path: /input-value
order: 1
---

# Input Value

Generates `value` and `onChange` that satisfies input elements.

```shell
npm install @huse/input-value
```
npm package: @huse/intersection
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Intersection   path: /intersection order: 1 ---
Latest version: 1.2.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Intersection
  path: /intersection
order: 1
---

# Intersection

Provides hooks to observe intersection between element and viewport.

```shell
npm install @huse/intersection
```
npm package: @huse/local-storage
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Local Storage   path: /local-storage order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Local Storage
  path: /local-storage
order: 1
---

# Local Storage

Access, observe and update `localStorage`.

```shell
npm install @huse/local-storage
```
npm package: @huse/media
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Media   path: /media order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Media
  path: /media
order: 1
---

# Media

Provide hooks to observe media query matches.

```shell
npm install @huse/media
```
npm package: @huse/merged-ref
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Merged Ref   path: /merged-ref order: 1 ---
Latest version: 1.2.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Merged Ref
  path: /merged-ref
order: 1
---

# Merged Ref

Merge multiple refs into one.

```shell
npm install @huse/merged-ref
```
npm package: @huse/methods
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Methods   path: /methods order: 1 ---
Latest version: 1.2.2

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Methods
  path: /methods
order: 1
---

# Methods

Provides infrastructure hooks to encapsulate a state and some methods together.

```shell
npm install @huse/methods
```
npm package: @huse/network
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Network   path: /network order: 1 ---
Latest version: 1.1.3

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Network
  path: /network
order: 1
---

# Network

Provides hooks to resolve and listen on network states like online or connectivity.

```shell
npm install @huse/network
```
npm package: @huse/number
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Number   path: /number order: 1 ---
Latest version: 1.2.2

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Number
  path: /number
order: 1
---

# Number

Hooks to manage and mutate number types.

```shell
npm install @huse/number
```
npm package: @huse/optimistic
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Optimistic   path: /optimistic order: 1 ---
Latest version: 0.10.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Optimistic
  path: /optimistic
order: 1
---

# Optimistic

Provides a set of react hooks to help manage optimistic states.

As previously stated in [redux-optimistic-thunk](https://github.com/ecomfe/redux-optimistic-thunk#why-this-middleware),
manually managing optimistic states, commits, rollbacks and transactions is not ideal model of state management.
React hooks provide powers to manage states in a more functional way, and this library aimed to build optimistic functions above hooks.

**This library requires [ES6 Generators](https://caniuse.com/#feat=es6-generators) to work.**
npm package: @huse/performance
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Performance   path: /performance order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Performance
  path: /performance
order: 1
---

# Performance

Provides hooks to track and report component performance.

```shell
npm install @huse/performance
```
npm package: @huse/poll
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Poll   path: /poll order: 1 ---
Latest version: 1.1.2

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Poll
  path: /poll
order: 1
---

# Poll

Poll data periodically and update corresponding state.

```shell
npm install @huse/poll
```
npm package: @huse/previous-value
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Previous Value   path: /previous-value order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Previous Value
  path: /previous-value
order: 1
---

# Previous Value

Provides hooks about retrieving and comparing current value with the previous version.

```shell
npm install @huse/previous-value
```
npm package: @huse/request
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Request   path: /request order: 1 ---
Latest version: 1.3.0

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Request
  path: /request
order: 1
---

# Request

Tries to provide basic capabilities to make a request inside react components.

By "request" we mean any asynchronous mapping from a input to an output, typically a HTTP fetch.

```shell
npm install @huse/request
```
npm package: @huse/router
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Router   path: /router order: 1 ---
Latest version: 0.11.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Router
  path: /router
order: 1
---

# Router

Enpower `react-router-dom` with hooks to interactive with location, state, search params and more.

**NOTE: This packages works only with `v5.x` and `react-router-dom` currently, `react-router-native` and `6.x` version are not supported.**

```shell
npm install @huse/router
```
npm package: @huse/script
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Script   path: /script order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Script
  path: /script
order: 1
---

# Script

Dynamically load a script via hook.

```shell
npm install @huse/script
```
npm package: @huse/scroll-into-view
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Scroll Into View   path: /scroll-into-view order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Scroll Into View
  path: /scroll-into-view
order: 1
---

# Scroll Into View

```shell
npm install @huse/scroll-into-view
```
npm package: @huse/scroll-lock
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Scroll Lock   path: /scroll-lock order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Scroll Lock
  path: /scroll-lock
order: 1
---

# Scroll Lock

Lock and unlock scroll conditionally.

```shell
npm install @huse/scroll-lock
```
npm package: @huse/scroll-position
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Scroll Position   path: /scroll-position order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Scroll Position
  path: /scroll-position
order: 1
---

# Scroll Position

Provides a set of hooks to observe element or window scroll position.

```shell
npm install @huse/scroll-position
```
npm package: @huse/selection
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Selection   path: /selection order: 1 ---
Latest version: 1.1.2

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Selection
  path: /selection
order: 1
---

# Selection

Hooks about selecting on a list of items via mouse clicks.

```shell
npm install @huse/selection
```
npm package: @huse/snapshot
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Snapshot   path: /snapshot order: 1 ---
Latest version: 1.1.2

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Snapshot
  path: /snapshot
order: 1
---

# Snapshot

Provides hook to manage value history and work with undo and redo features.

```shell
npm install @huse/snapshot
```
npm package: @huse/timeout
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Timeout   path: /timeout order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Timeout
  path: /timeout
order: 1
---

# Timeout

Hooks about timeout and interval.

```shell
npm install @huse/timeout
```
npm package: @huse/transition-state
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Transition State   path: /transition-state order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Transition State
  path: /transition-state
order: 1
---

# Transition State

Provide a hook which will go back to its default value after a certain duration when set to a new value.

```shell
npm install @huse/transition-state
```
npm package: @huse/update
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Update   path: /update order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Update
  path: /update
order: 1
---

# Update

Force component to update.

```shell
npm install @huse/update
```
npm package: @huse/user-media
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: User Media   path: /user-media order: 1 ---
Latest version: 0.10.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: User Media
  path: /user-media
order: 1
---

# User Media

Open a media stream in browser to produce video and audio from client.

```shell
npm install @huse/user-media
```
npm package: @huse/web-socket
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Web Socket   path: /web-socket order: 1 ---
Latest version: 0.11.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Web Socket
  path: /web-socket
order: 1
---

# Web Socket
Hooks to work with web socket.

```shell
npm install @huse/web-socket
```
npm package: @huse/window-size
Description: --- title: README nav:   title: Hooks   path: /hook group:   title: Window Size   path: /window-size order: 1 ---
Latest version: 1.1.1

---
title: README
nav:
  title: Hooks
  path: /hook
group:
  title: Window Size
  path: /window-size
order: 1
---

# Window Size

Read and observe the size of viewport.

```shell
npm install @huse/window-size
```
npm package: @husevaag.marius/bank-validation
Description: A package for validating banks, account numbers, OCR and more.
Author: Marius Husevåg
Latest version: 1.1.6

# Bank Validation Package

This package provides validation functions for bank, bankgiro, ocr, plusgiro, etc. It is designed to be simple and easy to use, ensuring that the data you work with meets the necessary criteria.

## Installation

To install the validation package, use npm:

```bash
npm install @husevaag.marius/bank-validation
```

## Usage

You can import the validation functions as follows:

```typescript
import { validateOcrSweden } from "bank-validation";
```

### validateBankSweden

This function validates banks based on special criterias.

**Example:**

```typescript
const bank: BankSweden = {
  name: "Bank Name",
  regex: "^[0-9]{8}$",
  type: 1
  comment: 2
  mod10: true
  clen: 2
};
const isValid = validateBankSweden("123456789", bank);
console.log(isValid); // true or false
```

### validateOcrSweden

This function validates swedish OCR.

**Example:**

```typescript
const isOcrValid = validateOcrSweden('12345');
console.log(isOcrValid); // true or false
```

### validatePlusgiroSweden

This function validates swedish plusgiro.

**Example:**

```typescript
const isPlusgiroValid = validatePlusgiroSweden('00123');
console.log(isPlusgiroValid); // true or false
```

### validateBankgiroSweden

This function validates swedish bankgiro.

**Example:**

```typescript
const isBankgiroValid = validateBankgiroSweden('50680241477');
console.log(isBankgiroValid); // true or false
```

## Contributing

Contributions are welcome! Please submit a pull request or open an issue for any enhancements or bug fixes.

## License

This project is licensed under the MIT License.