open-index/open-npm huggingface dataset:
npm package: @scaleway/fuzzy-search
Description: A small utility to use fuzzy search
Latest version: 1.0.2

# `@scaleway/fuzzy-search`

A fuzzy search utility

---

## Install

```bash
$ pnpm add @scaleway/fuzzy-search
```

## Usage

```js
import { isFuzzyMatch } from "@scaleway/fuzzy-search";

const match = isFuzzyMatch("test", "tests");
```
npm package: @scaleway/jest-helpers
Description: A package for utilities jest functions
Latest version: 4.0.3

# `@scaleway/jest-helpers`

## A package for utilities jest functions

## Install

```bash
$ pnpm add @scaleway/jest-functions
```

## How to use

### Create the helpers functions

```tsx
import makeHelpers from '@scaleway/jest-helpers'

const Wrapper = ({ children }) => <ThemeProvider>{children}</ThemeProvider>

export const {
  renderWithTheme,
  shouldMatchEmotionSnapshot,
  shouldMatchEmotionSnapshotWithPortal,
} = makeHelpers(Wrapper)
```

#### With a theme prop

```tsx
import makeHelpers from '@scaleway/jest-helpers'
import defaultTheme from '..'

interface WrapperProps {
  theme?: typeof defaultTheme
}

const Wrapper = ({ theme, children }) => (
  <ThemeProvider theme={theme}>{children}</ThemeProvider>
)

export const {
  renderWithTheme,
  shouldMatchEmotionSnapshot,
  shouldMatchEmotionSnapshotWithPortal,
} = makeHelpers(Wrapper)
```

#### With CreateSerializerOptions

```tsx
import makeHelpers from '@scaleway/jest-helpers'

const Wrapper = ({ children }) => <ThemeProvider>{children}</ThemeProvider>

export const {
  renderWithTheme,
  shouldMatchEmotionSnapshot,
  shouldMatchEmotionSnapshotWithPortal,
} = makeHelpers(Wrapper, { classNameReplacer: className => className })
```

### `renderWithTheme`

Automatically uses `CacheProvider` from `@emotion/cache`. Use it with a component, optional options & optional theme.

```tsx
const renderWithTheme = (
  component: ReactNode, // The component to render
  options?: RenderOptions, // RenderOptions from @testing-library/react
  theme?: Theme, // Optional theme to use which will be passed to the Wrapper above
) => ReturnType<typeof render>
```

### `shouldMatchEmotionSnapshot` / `shouldMatchEmotionSnapshotWithPortal`

Internally it uses the `renderWithTheme` generated from above.

```tsx
const shouldMatchEmotionSnapshot = (
  component: ReactNode, // The component to render
  options: {
    // In an object to make it backward-compatible and don't introduce any API breaking changes
    options?: RenderOptions // RenderOptions from @testing-library/react
    transform?: (node: ReturnType<typeof render>) => Promise<void> | void // (a)sync function execute between the render and the expect. You can use this if you need mockAllIsIntersecting
    theme?: Theme // Optional theme to use which will be passed to the Wrapper above
  },
) => Promise<void>
```
npm package: @scaleway/outdated-browser
Description: A small web script to display outdated banner
Latest version: 3.0.4

# `@scaleway/outdated-browser`

A small web script to display outdated banner

---

## Install

```bash
$ pnpm add @scaleway/outdated-browser
```

## Usage

This package is intended to be used in tandem with a bundler
Only one parameter is required, a regex of accepted browser user agents

Example with webpack:

```js
import { getUserAgentRegExp } from 'browserslist-useragent-regexp'

const SUPPORTED_BROWSERS = getUserAgentRegExp({
  browsers: '> 1%, last 2 versions, Firefox ESR, not IE > 0, not IE_Mob > 0',
  allowHigherVersions: true,
  ignoreMinor: true,
  ignorePatch: true,
}).toString()

export default {
  entry: {
    outdated: '@scaleway/outdated-browser',
    main: './src/index.tsx',
  },
  plugins: [
    new webpack.DefinePlugin({
      SUPPORTED_BROWSERS,
    }),
  ],
}
```
npm package: @scaleway/oxlint-config
Description: Scaleway's shareable configuration for oxlint
Author: Scaleway
Latest version: 0.1.11

# @scaleway/oxlint-config

Scaleway's shareable configuration for [oxlint](https://oxc.rs/docs/guide/usage/linter.html).

## Installation

```bash
npm install --save-dev @scaleway/oxlint-config
```

## Usage

Create a `.oxlintrc.json` file in your project root:

```json
{
  "extends": ["@scaleway/oxlint-config"]
}
```

### Framework-Specific Configurations

#### React

For React projects, extend the React configuration:

```json
{
  "extends": ["@scaleway/oxlint-config", "@scaleway/oxlint-config/react"]
}
```

#### TypeScript

For TypeScript projects, extend the TypeScript configuration:

```json
{
  "extends": ["@scaleway/oxlint-config", "@scaleway/oxlint-config/typescript"]
```

}

#### Combined React and TypeScript

For React projects using TypeScript, extend both configurations:

```json
{
  "extends": [
    "@scaleway/oxlint-config",
    "@scaleway/oxlint-config/react",
    "@scaleway/oxlint-config/typescript"
  ]
}
```

## Available Configurations

1. **Base rules** (`@scaleway/oxlint-config`): Core rules for all JavaScript/TypeScript projects
2. **React rules** (`@scaleway/oxlint-config/react`): React-specific rules
3. **TypeScript rules** (`@scaleway/oxlint-config/typescript`): TypeScript-specific rules

## License

MIT
npm package: @scaleway/random-name
Description: A small utility to generate a random name
Latest version: 5.1.4

# `@scaleway/random-name`

A tiny utility to generate random names.

Fully inspired by [Moby name generator](https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go)

---

## Install

```bash
$ pnpm add @scaleway/random-name
```

## Usage

```js
import randomName from '@scaleway/random-name'

// randomName(prefix: string = '', separator: string = '-'): string

randomName() // => "admiring-allen"
randomName('superb') // => "superb-admiring-allen"
randomName('superb', '_') // => "superb_admiring_allen"
randomName('', '_') // => "admiring_allen"
```
npm package: @scaleway/regex
Description: A small utility to use regex
Latest version: 5.8.1

# `@scaleway/regex`

A tiny utility to use named regex

---

## Install

```bash
$ pnpm add @scaleway/regex
```

## Usage

```js
import { fourDigitsCode } from '@scaleway/regex'

const isFourDigit = fourDigitsCode.test('1234')
```