open-index/open-npm huggingface dataset:
npm package: @radulucut/green-to-red
Description: Get a color from a green to red scale
Author: Radu Lucuț
Latest version: 1.0.11

# green-to-red

![](https://github.com/radulucut/green-to-red/workflows/Node%20CI/badge.svg)
[![npm](https://img.shields.io/npm/v/@radulucut/green-to-red)](https://www.npmjs.com/package/@radulucut/green-to-red)
[![npm](https://img.shields.io/npm/dt/@radulucut/green-to-red)](https://www.npmjs.com/package/@radulucut/green-to-red)
[![GitHub](https://img.shields.io/github/license/radulucut/green-to-red)](https://github.com/radulucut/green-to-red/blob/master/LICENSE)

Get a color from a green to red scale

![green-To-red](./demo/green-to-red.png)

## Install

```
$ npm install @radulucut/green-to-red --save
```

## Usage

```javascript
const greenToRed = require("@radulucut/green-to-red");

greenToRed(0); // Output -> [0, 255, 0]

greenToRed(20, true); // Output -> #32ff00

greenToRed(100, true); // Output -> #ff0000
```

## Demo

https://radulucut.github.io/green-to-red/demo/
npm package: @radulucut/relative
Description: Format the relative time between the current date and a given date in a human readable format. The output is rounded to the nearest time unit, i.e. 1 year ago, 5 minutes ago, in 3 days, in 6 seconds
Author: Radu Lucuț
Latest version: 2.0.5

# relative (Relative Time Format)

![](https://github.com/radulucut/relative/workflows/Node%20CI/badge.svg)
[![npm](https://img.shields.io/npm/v/@radulucut/relative)](https://www.npmjs.com/package/@radulucut/relative)
[![npm](https://img.shields.io/npm/dt/@radulucut/relative)](https://www.npmjs.com/package/@radulucut/relative)
[![GitHub](https://img.shields.io/github/license/radulucut/relative)](https://github.com/radulucut/relative/blob/master/LICENSE)

Format the relative time between the current date and a given date in a human readable format.
The output is rounded to the nearest time unit, i.e. `1 year ago`, `5 minutes ago`, `in 3 days`, `in 6 seconds`.

Built on top of the [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat) API. Supports multiple languages and custom formatting options.

## Install

```
$ npm install @radulucut/relative --save
```

## Usage

```javascript
import Time from "@radulucut/relative";

const time = Time();
time.Relative(new Date("2024-01-01T00:00:00.000Z")); // "2 months ago"

const timeRO = Time("ro", { numeric: "auto" });
timeRO.Relative(new Date("2024-05-01T00:00:00.000Z")); // "peste 2 luni"

const timeES = Time("es", { style: "long" });
timeES.Relative(new Date("2024-01-01T00:00:00.000Z")); // "hace 2 meses"
```
npm package: @radulucut/scripts
Description: Load and keep track of scripts in the DOM
Author: Radu Lucuț
Latest version: 3.0.0

# scripts - Dynamic script loader for DOM

Load and keep track of scripts in the DOM.

![](https://github.com/radulucut/scripts/workflows/Node%20CI/badge.svg)
[![npm](https://img.shields.io/npm/v/@radulucut/scripts)](https://www.npmjs.com/package/@radulucut/scripts)
[![npm](https://img.shields.io/npm/dt/@radulucut/scripts)](https://www.npmjs.com/package/@radulucut/scripts)
[![GitHub](https://img.shields.io/github/license/radulucut/scripts)](https://github.com/radulucut/scripts/blob/master/LICENSE)

## Install

```
$ npm install @radulucut/scripts
```

## Usage

```javascript
import Scripts from "@radulucut/scripts";

const scripts = Scripts(document);

scripts.Load(
  "./script.js",
  () => {
    console.log("script loaded");
  },
  () => {
    console.error("Failed to load script");
  }
);

scripts.Load(
  "https://code.jquery.com/jquery-3.5.1.min.js",
  () => {
    console.log("jQuery loaded");
  },
  () => {
    console.error("Failed to load jQuery");
  }
);

const isLoaded = scripts.IsLoaded("./script2.js"); // false
```
npm package: @radutils/config-builder-source-azure
Description: Config Builder source for Azure App Configuration service endpoints with Key Vault reference support
Author: Thomas Haugland Rudfoss
Latest version: 0.1.2

# Azure config source

```
npm install @radutils/config-builder-source-azure@beta
```

This library contains config sources for Azure App Configuration and Azure Key Vault compatible with `@radutils/config-builder`.

## Usage

The [app](./examples/appConfigExample.ts) describes how to set up a production ready source and config builder. More examples can be found in the [examples folder](./examples).

## Azure App Configuration

The `ConfigSourceAzureAppConfiguration` provides a way to load configuration values from an associated App Configuration instance. It can also resolve referred values such as Key Vault references automatically.

There are two main ways to initialize this source. Through the static method `createDefault` (recommended) or directly as a `new` instance. CreateDefault works as long as you are logged in to an account in Azure CLI or PowerShell that has access to the App Configuration instance you wish to read from first.

```typescript
// Read endpoint from an environment variable.
const endpoint = process.env["APPCONFIG_ENDPOINT"]

// Specify any labels to try in order, leave blank to use unlabelled value
const labels: string[] = []

// createDefault is recommended and should work for most scenarios.
ConfigSourceAzureAppConfiguration.createDefault({ endpoint, labels })
```

```typescript
// Create a separate app configuration client directly.
const connectionString = "..."
const appConfigClient = new AppConfigurationClient(connectionString)

// Create a new direct instance where you must provide the client yourself.
new ConfigSourceAzureAppConfiguration({ client: appConfigClient })
```


## Authorization

The library will use `@azure/identity` [`DefaultAzureCredentials`](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/README.md#defaultazurecredential) for authorization. This is a multi-credential class that should work well for most situations including hosting the application in Azure. To use your own account you can log in through the Azure CLI or Azure PowerShell and your credentials should be recognized.

Optionally you can override the `credential` option or the entire `client` in the options when creating an instance of the source to provide your own authorization mechanism.

## `getFixedDefaultAzureCredential`

A utility function that addresses a specific issue with the `DefaultAzureCredential`:

This function addresses a problem with the `DefaultAzureCredential` where a timeout value carries over from some older request causing a long delay when looking up key vault secrets. This is NOT intended as a permanent fix, but a workaround until there is a more "official" way to solve the problem. Ref: [https://github.com/Azure/azure-sdk-for-js/issues/23017](https://github.com/Azure/azure-sdk-for-js/issues/23017)

This "fixed" credential is used in place of the `DefaultAzureCredential` when calling `ConfigSourceAzureAppConfiguration.createDefault`
npm package: @radweb/eslint-config
Description: Radweb Javascript Linting
Latest version: 3.0.1


# @radweb/eslint-config

Extends eslint-config-airbnb

Requires the following modules to also be installed:

- "babel-eslint": "^8.0.0",
- "eslint": "^3.4.0",
- "eslint-config-airbnb": "^10.0.1",
- "eslint-import-resolver-webpack": "^0.8.0",
- "eslint-plugin-babel": "^4.1",
- "eslint-plugin-flowtype": "^2.43",
- "eslint-plugin-import": "^2.8",
- "eslint-plugin-jsx-a11y": "^6.0",
- "eslint-plugin-react": "^7.6"