open-index/open-npm huggingface dataset:
npm package: @foseberg/react-useloading
Description: Reusable hook to create loading states in react
Latest version: 1.0.0

# Introduction

UseLoading allows you to easily add loading states to your elements by following a simple pattern of adding a data-loading property to the elements you want to trigger loading states on:

```
import useLoading from 'useLoading'


const Card = ({ loading }: ICardProps) => {
  const ref = useLoading(loading, 'loadingClass');

  return (
    <div className="card" ref={ref}>
      <h1 className="card-title" data-loading>
        This is a title
      </h1>
      <p className="card-description" data-loading>
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris
        imperdiet orci eget nunc mattis faucibus. In a purus turpis. Cras
        condimentum diam nec consequat cursus.
      </p>

      <Image />

      <div className="card-price" data-loading>
        1000$
      </div>
    </div>
  );
};

export default Card;
```
npm package: @fosen/aj-captcha-react
Description: aj-captcha react版本 项目适配调整
Latest version: 1.1.2

## Captcha

[AJ-Captcha](https://gitee.com/anji-plus/captcha)  React版 ,界面优化调整 支持滑块和点选切换

![alt slide.png](https://raw.githubusercontent.com/yuegongzi/aj-captcha-react/master/src/assert/slide.png)

![alt point.png](https://raw.githubusercontent.com/yuegongzi/aj-captcha-react/master/src/assert/point.png)

## Getting Started

Install dependencies,

```bash

$ yarn add aj-captcha-react

  // or
  
$ npm install aj-captcha-react
```

## API

| 属性        | 说明                                              | 类型     | 默认值                     |
| ----------- | ------------------------------------------------- | -------- | -------------------------- |
| onFail      | 校验失败时的函数回调                              | Function | -                          |
| onSuccess   | 校验成功时的函数回调,会将二次校验参数作为参数传递 | Function | -                          |
| type        | 显示校验模块的方式,可选 point(点选),slide(滑动)   | String   | auto                      |
| path        | 后端路径前缀                                      | String   | -                          |

## hooks

useCaptcha

```jsx
import React, { useRef } from 'react';
import { useCaptcha } from 'aj-captcha-react';

export default () => {
  const [run] = useCaptcha({ path: 'http://foo.com', type: 'auto' });

  const click = async () => {
    const data = await run()
    console.log(data)
  };

  return (<button onClick={click}>verify</button>);
}

```

## Demo

```jsx
import React, { useRef } from 'react';
import { Captcha } from 'aj-captcha-react';

export default () => {
  const ref = useRef();

  const click = () => {
    ref.current?.verify();
  };

  return (
    <Captcha
      onSuccess={(data) => console.log(data)}
      path='https://api.xxx.com'
      type='auto'
      ref={ref}
    >
      <button
        onClick={click}
        style={{
          border: 'none',
          color: '#fff',
          width: '100px',
          height: '50px',
          lineHeight: '50p',
          background: '#1890ff',
        }}
      >
        点击
      </button>
    </Captcha>
  );
}

```
npm package: @fosenu/httpclient
Description: A HTTP-client written in typescript, using native node.js library
Author: Jonas Kirkemyr
Latest version: 0.1.4

# @fu/httpclient

[![Build Status](https://travis-ci.org/fosenutvikling/httpclient.svg?branch=master)](https://travis-ci.org/fosenutvikling/httpclient)


HTTP Client for node.js, using node.js own `http` and `https` library. Zero dependencies!

## Getting Started

```
npm install @fu/httpclient
```

### Installing

To setup your own development environment: 

Install dev-dependencies

```
npm install --dev
```

Run tests

```
npm test
```


## Deployment

To use in your own project

```ts
import {Client} from '@fu/httpclient';
const client = new Client('localhost', {
    port: 80
});

const response = await client.get('/hello-world');
```

`new Client(hostname, options)`

Available options

    - `baseUrl` - hostname, uses the hostname parameter from the constructor
    - `protocol` - http or https
    - `encoding` - Character encoding 
    - `port` - Port to use for hostname, default 80 for http, 443 for https
    - `error` - Function to call when an error occurs
    - `headers` - HTTP headers for all requests

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/httpclient/tags). 


## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
npm package: @fosenu/prettier
Description: Prettier configuration
Author: Jonas Kirkemyr
Latest version: 0.1.1

# @fosenu/prettier
Prettier configuration used by Fosen Utvikling

## Usage

    npm install @fosenu/prettier --save-dev

Create a `prettierrc.js` file, import this package, and export its content

```js
module.exports = require('@fosenu/prettier');
```
npm package: @fosenu/tslint
Description: TSLint configuration as used by Fosen Utvikling AS
Author: Jonas Kirkemyr
Latest version: 0.1.3

# @fosenu/tslint
TSLint configuration as used by Fosen Utvikling AS

## Usage

Create a new `tslint.json` file

```json
{
    "extends": "@fosenu/tslint"
}
```
npm package: @fosfad/json-schema-typescript-definitions
Description: Types and interfaces for writing valid JSON schema in TypeScript.
Author: Petr Flaks
Latest version: 0.2.0

# JSON Schema TypeScript definitions

This package contains TypeScript definitions for JSON Schema. It may be useful in all kind of TypeScript projects that work with JSON Schema directly.

Supported JSON Schema drafts:

- [2020-12](https://json-schema.org/draft/2020-12/json-schema-core.html)

## Getting started

Install the definitions:

```bash
npm install @fosfad/json-schema-typescript-definitions
```

Import `JsonSchema` type definition:

```typescript
import { JsonSchema } from '@fosfad/json-schema-typescript-definitions/2020-12';
```

## Documentation

### Exported types

The package exports 3 types: `JsonSchemaBoolean`, `JsonSchemaObject` and `JsonSchema`:

- `JsonSchemaBoolean` stands for [Boolean JSON Schema](https://json-schema.org/draft/2020-12/json-schema-core.html#rfc.section.4.3.2);
- `JsonSchemaObject` is an object with all possible JSON Schema keywords within;
- `JsonSchema` is a union type between `JsonSchemaBoolean` and `JsonSchemaObject`.
npm package: @fosfad/openapi-typescript-definitions
Description: Types and interfaces for writing valid OpenAPI specification in TypeScript.
Author: Petr Flaks
Latest version: 0.0.28

# OpenAPI TypeScript definitions

This package contains TypeScript definitions for OpenAPI. It may be useful in all kind of TypeScript projects that work with OpenAPI directly, for example, in code generators, in documentation generators and other kinds of projects.

Supported OpenAPI versions:

- [3.1.0](https://spec.openapis.org/oas/v3.1.0)

Since OpenAPI specification relies on JSON Schema specification, this package also has [@fosfad/json-schema-typescript-definitions](https://github.com/fosfad/json-schema-typescript-definitions) package in its dependencies which provides type definitions for JSON Schema.

## Getting started

Install the definitions:

```bash
npm install @fosfad/openapi-typescript-definitions
```

Import `OpenAPI` (and other needed types):

```typescript
import { OpenAPI } from '@fosfad/openapi-typescript-definitions/3.1.0';
```
npm package: @fossa-app/bridge
Description: Shared Domain Models and DTOs for Fossa UI and API
Latest version: 0.1.26

# FossaApp Bridge
[![NuGet Version](https://img.shields.io/nuget/v/Fossa.Bridge.svg?color=blue)](https://www.nuget.org/packages/Fossa.Bridge/)
[![npm Version](https://img.shields.io/npm/v/%40fossa-app%2Fbridge?color=blue)](https://www.npmjs.com/package/@fossa-app/bridge)
[![Developed by Tigran (TIKSN) Torosyan](https://img.shields.io/badge/Developed%20by-%20Tigran%20%28TIKSN%29%20Torosyan-orange.svg)](https://tiksn.com/)
[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

The FossaApp Bridge provides shared frontend and backend functionality.

## Project Purpose
The Fossa.Bridge project is a shared F# library designed to encapsulate logic, validation, and domain models that are common to both the .NET backend and the TypeScript/JavaScript frontend. By using [Fable](https://fable.io/), the F# code is transpiled into JavaScript/TypeScript for the frontend environment while simultaneously being compiled into a standard .NET library for the backend. This ensures a single source of truth for core business logic, API models, and data validation rules, reducing duplication and preventing synchronization issues between the client and server.

## Package Usage

### For .NET Backends (C# / F#)
Install the NuGet package:

```bash
dotnet add package Fossa.Bridge
```

### For JavaScript / TypeScript Frontends
Install the NPM package:

```bash
npm install @fossa-app/bridge
```
or using Yarn:
```bash
yarn add @fossa-app/bridge
```

## Features
- Shared API domain models.
- Common validation and helper logic.
- Consistent behavior across client and server.

## Building and Packaging
To build both NPM and NuGet packages locally, run the included PowerShell script:

```bash
.\pack.ps1
```
npm package: @fossbarrow/swedish-ssn-validator
Description: Swedish Social Security Number validator and masker
Author: fossbarrow
Latest version: 1.0.0

# Swedish SSN Validator

[![MIT Licensed](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)

Validate and mask functionality for an Swedish Social Security Number (SSN).

## Installation
Install the package via `npm`:

```sh
npm install @fossbarrow/swedish-ssn-validator@1.0.0 --save
```

## Usage
### `ssnIsValid(value)`
This method validates if the given value is a valid `Social Security Number`.

### Input
string matching 10 or 12 _words_ in length. Dashes and colons are ignored to the
length count.

#### Example

```js
ssnIsValid({});
// => false

ssnIsValid('011-23-4567');
// => false

ssnIsValid('011234567');
// => false

ssnIsValid('1990-11-21:1234');
// => True

ssnIsValid('199011211234');
// => True

ssnIsValid('9011211234');
// => True

ssnIsValid('90-11-21:1234');
// => True
```

--------------------------------------------------------------------------------

### `mask(value)`
This method will help you protect the SSN from sensitive information by obfuscating some digits.

The ssn key for _day of birth_ and _gender_ is left unmasked.

#### Example

```js
ssnMask({});
// => Throws an Error.

ssnMask('900211-1234')
// => XXXX11XX3X

ssnMask('19900211-1234')
// => XXXXXX11XX3X

ssnMask('12345678912');
// => Throws an Error.
```

--------------------------------------------------------------------------------

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Credits

- [PatricNox](https://github.com/PatricNox)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
npm package: @fossil-engineering/mongoose
Description: Mongoose adapter for adminjs
Author: Wojciech Krysiak
Latest version: 3.0.1

## @adminjs/mongoose

This is an official [AdminJS](https://github.com/SoftwareBrothers/adminjs) adapter which integrates [mongoose ORM](https://mongoosejs.com/) into AdminJS.

## OpenSource SoftwareBrothers community

- [Join the community](https://join.slack.com/t/adminbro/shared_invite/zt-czfb79t1-0U7pn_KCqd5Ts~lbJK0_RA) to get help and be inspired.

## Usage

The plugin can be registered using standard `AdminJS.registerAdapter` method.

```javascript
const AdminJS = require('adminjs')
const AdminJSMongoose = require('@adminjs/mongoose')

AdminJS.registerAdapter(AdminJSMongoose)
```

More options can be found on [AdminJS](https://github.com/SoftwareBrothers/adminjs) official website.

## License

AdminJS is Copyright © 2021 SoftwareBrothers.co. It is free software, and may be redistributed under the terms specified in the [LICENSE](LICENSE) file.

## About SoftwareBrothers.co

<img src="https://softwarebrothers.co/assets/images/software-brothers-logo-full.svg" width=240>


We’re an open, friendly team that helps clients from all over the world to transform their businesses and create astonishing products.

* We are available for [hire](https://softwarebrothers.co/contact).
* If you want to work for us - checkout the [career page](https://softwarebrothers.co/career).