open-index/open-npm huggingface dataset:
npm package: @relmify/jest-serializer-strip-ansi
Description: jest snapshot serializer for removing ANSI text formatting escape codes
Author: Leila Pearson
Latest version: 1.0.2

# Jest Snapshot Serializer to Remove ANSI Escape Codes

[![CI](https://github.com/relmify/jest-serializer-strip-ansi/actions/workflows/main.yml/badge.svg)](https://github.com/relmify/jest-serializer-strip-ansi/actions/workflows/main.yml)

## Problem

When you create your own custom jest matchers, you'll want to test that those matchers produce the
expected output strings when errors occur. Jest snapshots are a great way to do that. The problem
is, jest error output contains extra characters that add little value to your jest matcher tests and
make the snapshot text difficult to read and review.

One example is extra quotes and quote escape characters (`\`) which can be quite deeply nested in
some error output strings. You can use the `jest-snapshot-serializer-raw` package to help with
these.

A second problem is ANSI escape codes which apply color and formatting. There is a
`jest-snapshot-serializer-ansi` package to remove these codes, but it currently has dependencies
that are flagged as moderate vulnerabilities.

## Solution

`@relmify/jest-serializer-strip-ansi` removes ANSI escape codes from Jest snapshot captures, and
does so with no runtime dependencies.

## Installation

With npm:

```sh
npm install -D @relmify/jest-serializer-strip-ansi
```

With yarn:

```sh
yarn add -D @relmify/jest-serializer-strip-ansi
```

## Setup and Use

To use this snapshot serializer for all jest snapshots, add
`@relmify/jest-serializer-strip-ansi/always` to your jest configuration.

### Setup with package.json

In your `package.json` file add:

```json
"jest": {
  "snapshotSerializers": ["@relmify/jest-serializer-strip-ansi/always"]
}
```

Or if you are also using `jest-snapshot-serializer-raw`:

```json
"jest": {
  "snapshotSerializers": ["@relmify/jest-serializer-strip-ansi/always", "jest-snapshot-serializer-raw/always"]
}
```

### Setup with jest.config.js

```js
// jest.config.js
module.exports = {
  snapshotSerializers: ['@relmify/jest-serializer-strip-ansi/always'],
};
```

Or if you are also using `jest-snapshot-serializer-raw`:

```js
// jest.config.js
module.exports = {
  snapshotSerializers: ['@relmify/jest-serializer-strip-ansi/always', 'jest-snapshot-serializer-raw/always'],
};
```

### Per-file use

If you want to use the serializer only in certain test files, then instead of adding the serializer
to your jest configuration, you can add the following to your selected test files:

```ts
import { stripAnsi } from '@relmify/jest-serializer-strip-ansi';

expect.addSnapshotSerializer(stripAnsi);
```

Note that you can add multiple snapshot serializers in your jest configuration, but you can only add
one snapshot serializer at a time using `expect.addSnapshotSerializer()`. Calling
`expect.addSnapshotSerializer()` a second time will replace the previously added serializer.

## LICENSE

[MIT](/LICENSE)
npm package: @reloaddk/daft
Description: ![daft_small](https://figmage.com/images/IPdWAod-s1xzh1NEJAZSF.png)
Author: Lasse Borly
Latest version: 1.3.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

![daft_small](https://figmage.com/images/IPdWAod-s1xzh1NEJAZSF.png)

## D(A)FT

**Damn (Awesome) Frontend Tooling**

### Install

```sh
npm install @reloaddk/daft --save-dev
```

The above package contains everything you would need to have your frontend up
and running.

### Configuration

Take a look in `/packages/daft/config`. These are example configs that provides
a good starting point but might as well be used as is.

Copy them into your own project. In root or at custom theme level dependant upon
your setup.

#### SASS

During development if you aren't able to have SASS changes trigger, remember to
add `--poll` to your watch script as seen in `example/package.json`, `css:watch`
command.

### [Example](https://daft.reload.dk/)

An example app is provided in `/packages/example`
and is shown at [https://daft.reload.dk/](https://daft.reload.dk/).
npm package: @reloaddk/drupal
Description: ![drupal_small](https://figmage.com/images/IPdWAod-s1xzh1NEJAZSF.png)
Author: Lasse Borly
Latest version: 0.1.0-beta.4
Deprecated: WARNING: This project has been renamed to daft. Install using @reloaddk/daft instead.

![drupal_small](https://figmage.com/images/IPdWAod-s1xzh1NEJAZSF.png)

## D(A)FT

**Drupal (Awesome) Frontend Tooling**

### Install

```sh
npm install @reloaddk/drupal
```

The above package contains everything you would need to have your frontend up
and running.

### Configuration

Take a look in `/packages/drupal/config`. These are example configs that provides
a good starting point but might as well be used as is.

Copy them into your own project. In root or at custom theme level dependant upon
your setup.

### [Example](https://daft.reload.dk/)

An example app is provided in `/packages/example`
and is shown at [https://daft.reload.dk/](https://daft.reload.dk/).
npm package: @reloaddk/stylelint-recommended
Description: A [Reload](https://reload.dk/) opinionated way of making sure our CSS code is up to snuff.
Author: Lasse Borly
Latest version: 0.2.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @reloaddk/stylelint-recommended

A [Reload](https://reload.dk/) opinionated way of making sure our CSS code is up to snuff.

## Usage

### Install

```sh
npm install stylelint @reloaddk/stylelint-recommended prettier --save-dev
```

Create these two files alongside your `package.json` file.

### .prettierrc.json

```json
{}
```

### .stylelintrc.json

```json
{
  "extends": ["@reloaddk/stylelint-recommended"]
}
```

Spin this badboy up and point stylelint and prettier towards your CSS files.

#### Lint

```sh
npx stylelint "**/*.css" && npx prettier "**/*.css" --check
```

#### Format

```sh
npx stylelint "**/*.css" --fix && npx prettier "**/*.css" --write
```

## Additional rules

Wanting to add additional rules is straightforward.

### [.stylelintrc.json](https://stylelint.io/user-guide/configure#rules)

```json
{
  "extends": ["@reloaddk/stylelint-recommended"],
  "rules": {
    "color-no-invalid-hex": true
  }
}
```

If wanting to extend the `@reloaddk/stylelint-recommended` we need to re-apply
the prettier `stylelint-config-prettier` configuration that turns off all
stylelint rules that is prettiers responsability.

Imagine we wanted to apply the Github CSS guidelines we would have to install
their config, extend from it and then make sure to append `stylelint-config-prettier`.

```sh
npm install stylelint-config-primer stylelint-config-prettier --save-dev
```

```json
{
  "extends": [
    "@reloaddk/stylelint-recommended",
    "stylelint-config-primer",
    "stylelint-config-prettier"
  ]
}
```
npm package: @reloaddk/stylelint-recommended-scss
Description: A [Reload](https://reload.dk/) opinionated way of making sure our SCSS code is up to snuff.
Author: Lasse Borly
Latest version: 0.4.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @reloaddk/stylelint-recommended-scss

A [Reload](https://reload.dk/) opinionated way of making sure our SCSS code is up to snuff.

## Usage

### Install

```sh
npm install stylelint @reloaddk/stylelint-recommended-scss prettier --save-dev
```

Create these two files alongside your `package.json` file.

### .prettierrc.json

```json
{}
```

### .stylelintrc.json

```json
{
  "extends": ["@reloaddk/stylelint-recommended-scss"]
}
```

Spin this badboy up and point stylelint and prettier towards your SCSS files.

```sh
npx stylelint "**/*.scss" && npx prettier "**/*.scss"
```

#### Lint

```sh
npx stylelint "**/*.scss" && npx prettier "**/*.scss" --check
```

#### Format

```sh
npx stylelint "**/*.scss" --fix && npx prettier "**/*.scss" --write
```

## Additional rules

Wanting to add additional rules is straightforward.

### [.stylelintrc.json](https://stylelint.io/user-guide/configure#rules)

```json
{
  "extends": ["@reloaddk/stylelint-recommended-scss"],
  "rules": {
    "color-no-invalid-hex": true
  }
}
```

If wanting to extend the `@reloaddk/stylelint-recommended-scss` we need to re-apply
the prettier `stylelint-config-prettier` configuration that turns off all
stylelint rules that is prettiers responsability.

Imagine we wanted to apply the Github CSS guidelines we would have to install
their config, extend from it and then make sure to append `stylelint-config-prettier`.

```sh
npm install stylelint-config-primer stylelint-config-prettier --save-dev
```

```json
{
  "extends": [
    "@reloaddk/stylelint-recommended-scss",
    "stylelint-config-primer",
    "stylelint-config-prettier"
  ]
}
```
npm package: @reloadly/reloadly.airtime
Description: reloadly.airtime
Author: reloadly
Latest version: 1.0.6

# @reloadly/reloadly.airtime

The implementation is based on the [Airtime API Docs](https://developers.reloadly.com/#airtime-api).

## Usage

```typescript
const ReloadlyAirtime = require("@reloadly/reloadly.airtime");
const ReloadlyCore = require("@reloadly/reloadly.core");

var api = new ReloadlyAirtime.AirtimeApi("<client id>", "<client secret>", null, ReloadlyCore.Environment.SANDBOX);
var operation = await api.accounts();
var request = operation.getBalance();
var balanceInfo = await request.execute();
```

You may find more information on the repository homepage:
https://github.com/Reloadly/reloadly-sdk-nodejs
npm package: @reloadly/reloadly.authentication
Description: reloadly.authentication
Author: reloadly
Latest version: 1.0.6

# @reloadly/reloadly.authentication

The implementation is based on the [Airtime API Docs](https://developers.reloadly.com/#airtime-api).

## Usage

```typescript
import ReloadlyAuthentication = require("@reloadly/reloadly.authentication");
import ReloadlyCore = require("@reloadly/reloadly.core");

var api = new ReloadlyAuthentication.AuthenticationApi("<client id>", "<client secret>", ReloadlyCore.ServiceURLs.AIRTIME_SANDBOX);
var operation = api.clientCredentials();
var request = operation.getAccessToken();
var response = await request.execute();
var token = response.access_token;
```

You may find more information on the repository homepage:
https://github.com/Reloadly/reloadly-sdk-nodejs
npm package: @reloadly/reloadly.core
Description: reloadly.core
Author: reloadly
Latest version: 1.0.6

# @reloadly/reloadly.core

The implementation is based on the [Airtime API Docs](https://developers.reloadly.com/#airtime-api).

@reloadly/reloadly.core is used as a dependency of @reloadly/reloadly.airtime and @reloadly/reloadly.authentication packages.

You may find more information on the repository homepage:
https://github.com/Reloadly/reloadly-sdk-nodejs
npm package: @relocale/i18n
Description: Internationalization and localization package
Author: Sergey Mishin
Latest version: 1.0.12

# Relocale

## Getting started

```
Library for localization and internationalization.
```

### Advantages
1. The size is 10 times smaller than in i18next
2. Works with all possible frameworks (React, Next.js, Vue itc.) and in pure javascript
3. Supports SSR, SSG

## Init

```javascript
import { init } from '@relocale/i18n';
const lang = 'en';

const resources = {
  en: {
    // ...some keys
  },
  de: {
    // ...some keys
  }
};

const onMissingKey = (missingKey) => {
  console.log(`Missing key: ${missingKey}`);
}

// sync operation
init({ lang, resources, onMissingKey });
```

## Usage

```javascript
import { t } from '@relocale/i18n';

// without params
t`some-key`
// or
t('some-key')
// or with nesting 
t`key1.key2.key3`

// with params
t('hi', { username: 'Garry' }) // Hi Garry
```

## Translations with params
```javascript
const resources = {
  en: {
    hi: 'Hi {{username}}'
  },
};
```

## Change language
```javascript
import { changeLang, getLang } from '@relocale/i18n';

const newLang = 'fr';

changeLang(newLang);

getLang(); // fr
```
npm package: @relocke/base58
Description: A ultra light weight (566 byte) base58 encode / decode
Author: ReLocke
Latest version: 1.0.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @ReLocke/base58

A ultra light weight stand alone JS implementation for base58 encoding & decoding.

- zero dependencies 🙅
- Only ~500 Bytes 🤏

size guaranteed with [size-limit](https://github.com/ai/size-limit)

[![npm version](https://badgen.net/npm/v/@relocke/base58)](https://www.npmjs.com/package/@relocke/base58)


## support

- Node.js >= 8
- Browser support for [spread destructuring](https://caniuse.com/?search=spread) and [Uint8Array](https://caniuse.com/?search=Uint8Array)


## setup
```shell
npm i --save @relocke/base58
```

#### esm import
```js
import { base58_to_binary, binary_to_base58 } from '@relocke/base58'
```
```js
import base58_to_binary from '@relocke/base58/base58_to_binary.js'
```
#### cjs require
```js
const {
  base58_to_binary,
  binary_to_base58
} = require('@relocke/base58/base58_to_binary.js')
```
```js
const base58_to_binary = require('@relocke/base58/base58_to_binary.js')
```

### Reference

1. [IETF](https://tools.ietf.org/id/draft-msporny-base58-02.txt)

# API

## Table of contents

- [namespace base58\_chars](#namespace-base58\_chars)
- [function base58\_to_binary](#function-base58\_to_binary)
- [function binary_to_base58](#function-binary_to_base58)

## namespace base58\_chars

Base58 characters must ONLY include `123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`

**Type:** string

---

## function base58\_to_binary

converts a base58 to its corresponding binary representation [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)

| Parameter      | Type                                    | Description           |
| :------------- | :-------------------------------------- | :-------------------- |
| `base58String` | [base58_chars](#namespace-base58_chars) | base58 encoded string |

**Returns:** Uint8Array — binary representation for the base58 string

### Examples

_base58 to binary_

> ```js
> import { base58_to_binary } from '@relocke/base58'
>
> const bin = base58_to_binary("6MRy")
> console.log(bin) // Uint8Array(3) [15, 239, 64]
> Buffer.from(bin).toString('hex') // 0fef40
> ```

---

## function binary_to_base58

Converts a [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) into a base58 string

| Parameter    | Type                | Description            |
| :----------- | :------------------ | :--------------------- |
| `uint8array` | Uint8Array \| Array | unsigned integer array |

**Returns:** [base58\_chars](#namespace-base58\_chars) — base58 string representation from the binary array

### Examples

_Binary array to base58 string_

> ```js
> import { binary_to_base58 } from '@relocke/base58'
>
> const str = binary_to_base58([15, 239, 64])
> console.log(str) // 6MRy
> ```