open-index/open-npm huggingface dataset:
npm package: @philipbaker4/color-utilities
Description: Lightweight library for color manipulation and linear gradient creation
Author: philbaker4
Latest version: 1.0.1

# [color-utilities](https://www.npmjs.com/package/@philipbaker4/color-utilities)

This is a lightweight library for color manipulation and linear gradient creation. The library was born out of frustration when trying to create and color vanilla Javascript data visualizations. I struggled to find lightweight, easy to use, and reliable resources to manipulate colors and generate customized multicolor linear gradients, so I started writing my own. Enjoy!

## Getting Started


### Installation
```bash
$ npm install @philipbaker4/color-utilities
```

### Usage
```js{18-31,34}
import { getMultiColorLinearGradient } from '@philipbaker4/color-utilities'

const multiColorGradientDefinition = [
  {
    minVal: 0,
    minColor: 'red',
    maxVal: 1,
    maxColor: 'blue',
  },
  {
    minVal: 1,
    minColor: 'blue',
    maxVal: 3,
    maxColor: 'yellow',
  },
];
getMultiColorDataGradient(multiColorGradientDefinition, 12, 'RGB_ARRAY')
---
[
    { color: [204, 0, 51], minVal: 0, maxVal: 0.25 },
    { color: [153, 0, 102], minVal: 0.25, maxVal: 0.5 },
    { color: [102, 0, 153], minVal: 0.5, maxVal: 0.75 },
    { color: [51, 0, 204], minVal: 0.75, maxVal: 1 },
    { color: [28, 28, 227], minVal: 1, maxVal: 1.25 },
    { color: [57, 57, 198], minVal: 1.25, maxVal: 1.5 },
    { color: [85, 85, 170], minVal: 1.5, maxVal: 1.75 },
    { color: [113, 113, 142], minVal: 1.75, maxVal: 2 },
    { color: [142, 142, 113], minVal: 2, maxVal: 2.25 },
    { color: [170, 170, 85], minVal: 2.25, maxVal: 2.5 },
    { color: [198, 198, 57], minVal: 2.5, maxVal: 2.75 },
    { color: [227, 227, 28], minVal: 2.75, maxVal: 3 },
]
---
getColorFromMultiColorDataGradient(multiColorGradientDefinition, 12, 0.5, 'RGB_ARRAY', true)
---
[102, 0, 153]
---

```

### [Complete Documentation](https://color-utilities-doc.vercel.app/)

## Development

Playground.ts can be used as a sandbox area to play around with existing functionality and develop new features. To run: 

```bash
$ npm run playground
```

### Testing
```bash
$ npm run test
```


## Feedback & Contributions

Feeback and contributions are both more than welcome. Feel free to submit issues and/or pull requests.
npm package: @philipbordallo/eslint-config
Description: Personal ESLint config
Author: Philip Bordallo
Latest version: 6.0.2

<!-- GENERATED -->
# @philipbordallo/eslint-config
> Personal ESLint config

[![NPM Version][npm-img]][npm-url]

See [`src/configs/default.js`](../../src/configs/default.js) for how it's fully setup or check the [generated file](https://unpkg.com/@philipbordallo/eslint-config).


## Install
Add as a `devDependency` with your favorite package manager.

```sh
npm add -D @philipbordallo/eslint-config
```

### Peer Dependencies

- [`eslint`](https://www.npmjs.com/package/eslint)

If you are using npm v7 or greater these should automatically be installed. Otherwise use your package manager to add them as `devDependencies` manually.

```sh
npm add -D eslint
```


## Setup

```js
module.exports = {
  extends: [
    '@philipbordallo',
  ],
};
```


[npm-img]: https://img.shields.io/npm/v/@philipbordallo/eslint-config.svg
[npm-url]: https://www.npmjs.com/package/@philipbordallo/eslint-config
npm package: @philipbordallo/eslint-config-html
Description: Personal ESLint config for HTML
Author: Philip Bordallo
Latest version: 6.0.2

<!-- GENERATED -->
# @philipbordallo/eslint-config-html
> Personal ESLint config for HTML

[![NPM Version][npm-img]][npm-url]

See [`src/configs/html.js`](../../src/configs/html.js) for how it's fully setup or check the [generated file](https://unpkg.com/@philipbordallo/eslint-config-html).


## Install
Add as a `devDependency` with your favorite package manager.

```sh
npm add -D @philipbordallo/eslint-config-html
```

### Peer Dependencies

- [`@html-eslint/eslint-plugin`](https://www.npmjs.com/package/@html-eslint/eslint-plugin)
- [`@html-eslint/parser`](https://www.npmjs.com/package/@html-eslint/parser)
- [`eslint`](https://www.npmjs.com/package/eslint)

If you are using npm v7 or greater these should automatically be installed. Otherwise use your package manager to add them as `devDependencies` manually.

```sh
npm add -D @html-eslint/eslint-plugin @html-eslint/parser eslint
```


## Setup

```js
module.exports = {
  extends: [
    '@philipbordallo',
    '@philipbordallo/html',
  ],
};
```


[npm-img]: https://img.shields.io/npm/v/@philipbordallo/eslint-config-html.svg
[npm-url]: https://www.npmjs.com/package/@philipbordallo/eslint-config-html
npm package: @philipbordallo/eslint-config-jest
Description: Personal ESLint config for Jest
Author: Philip Bordallo
Latest version: 6.0.2

<!-- GENERATED -->
# @philipbordallo/eslint-config-jest
> Personal ESLint config for Jest

[![NPM Version][npm-img]][npm-url]

See [`src/configs/jest.js`](../../src/configs/jest.js) for how it's fully setup or check the [generated file](https://unpkg.com/@philipbordallo/eslint-config-jest).


## Install
Add as a `devDependency` with your favorite package manager.

```sh
npm add -D @philipbordallo/eslint-config-jest
```

### Peer Dependencies

- [`eslint-plugin-jest`](https://www.npmjs.com/package/eslint-plugin-jest)
- [`eslint-plugin-jest-dom`](https://www.npmjs.com/package/eslint-plugin-jest-dom)
- [`eslint`](https://www.npmjs.com/package/eslint)

If you are using npm v7 or greater these should automatically be installed. Otherwise use your package manager to add them as `devDependencies` manually.

```sh
npm add -D eslint-plugin-jest eslint-plugin-jest-dom eslint
```


## Setup

```js
module.exports = {
  extends: [
    '@philipbordallo',
    '@philipbordallo/jest',
  ],
};
```


[npm-img]: https://img.shields.io/npm/v/@philipbordallo/eslint-config-jest.svg
[npm-url]: https://www.npmjs.com/package/@philipbordallo/eslint-config-jest
npm package: @philipbordallo/eslint-config-react
Description: Personal ESLint config for React
Author: Philip Bordallo
Latest version: 6.0.2

<!-- GENERATED -->
# @philipbordallo/eslint-config-react
> Personal ESLint config for React

[![NPM Version][npm-img]][npm-url]

See [`src/configs/react.js`](../../src/configs/react.js) for how it's fully setup or check the [generated file](https://unpkg.com/@philipbordallo/eslint-config-react).


## Install
Add as a `devDependency` with your favorite package manager.

```sh
npm add -D @philipbordallo/eslint-config-react
```

### Peer Dependencies

- [`eslint-plugin-jsx-a11y`](https://www.npmjs.com/package/eslint-plugin-jsx-a11y)
- [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks)
- [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react)
- [`eslint`](https://www.npmjs.com/package/eslint)

If you are using npm v7 or greater these should automatically be installed. Otherwise use your package manager to add them as `devDependencies` manually.

```sh
npm add -D eslint-plugin-jsx-a11y eslint-plugin-react-hooks eslint-plugin-react eslint
```


## Setup

```js
module.exports = {
  extends: [
    '@philipbordallo',
    '@philipbordallo/react',
  ],
};
```


[npm-img]: https://img.shields.io/npm/v/@philipbordallo/eslint-config-react.svg
[npm-url]: https://www.npmjs.com/package/@philipbordallo/eslint-config-react
npm package: @philipbordallo/eslint-config-typescript
Description: Personal ESLint config for TypeScript
Author: Philip Bordallo
Latest version: 6.0.2

<!-- GENERATED -->
# @philipbordallo/eslint-config-typescript
> Personal ESLint config for TypeScript

[![NPM Version][npm-img]][npm-url]

See [`src/configs/typescript.js`](../../src/configs/typescript.js) for how it's fully setup or check the [generated file](https://unpkg.com/@philipbordallo/eslint-config-typescript).


## Install
Add as a `devDependency` with your favorite package manager.

```sh
npm add -D @philipbordallo/eslint-config-typescript
```

### Peer Dependencies

- [`@typescript-eslint/eslint-plugin`](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin)
- [`@typescript-eslint/parser`](https://www.npmjs.com/package/@typescript-eslint/parser)
- [`eslint`](https://www.npmjs.com/package/eslint)
- [`typescript`](https://www.npmjs.com/package/typescript)

If you are using npm v7 or greater these should automatically be installed. Otherwise use your package manager to add them as `devDependencies` manually.

```sh
npm add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint typescript
```


## Setup

```js
module.exports = {
  extends: [
    '@philipbordallo',
    '@philipbordallo/typescript',
  ],
};
```


[npm-img]: https://img.shields.io/npm/v/@philipbordallo/eslint-config-typescript.svg
[npm-url]: https://www.npmjs.com/package/@philipbordallo/eslint-config-typescript
npm package: @philipcatterall99/dataverse-gen
Description: Early bound types generator for dataverse-ify. This is an early test version which is a fork of Scott Durow's dataverse-gen. It is a work in progress aimed at adding Business Process Flow Metadata and a typings file for attributes. Ultimate goal is to typ
Author: Scott Durow
Latest version: 1.0.2

# dataverse-gen

Creates early bound TypeScript interfaces to work with `dataverse-ify`.
For more information see the [dataverse-ify project](https://github.com/scottdurow/dataverse-ify/wiki)

## Usage

1.  Add authentication for your Microsoft Dataverse Environment:\
`~$ npx dataverse-auth [environment]`\
E.g.\
`~$ npx dataverse-auth contosoorg.crm.dynamics.com`

1. Initialise dataverse-ify to create .dataverse-gen.json config file:\
`~$ npx dataverse-gen init`

1. At any time, you can re-generate the early bound types using:\
`~$ npx dataverse-gen`

## `.dataverse-gen.json`
The configuration for dataverse-gen is stored in the `.dataverse-gen.json` file. You can edit this manually if you want rather than use `npx dataverse-gen init`.  This is the only file that is needed to run `npx dataverse-gen`.

The standard templates use references to the dataverse-ify types, and so unless you edit the templates (see below) you will need to install these types using:

```shell
npm install --save dataverse-ify
```
## Custom Templates
If you wanted to just generate Attribute `enum` constants and stop there, you can easily customise the scripts to suit your needs by using:

```shell
npx dataverse-gen eject
```

This will create a step of templates ready to customise in the `_templates` folder. Once you have made your updates, just run `npx dataverse-gen` again. The templates use the awesome [ejs](https://ejs.co/) project. E.g.

```typescript
// Attribute constants
export const enum <%- locals.SchemaName %>Attributes {
<%locals.Properties && locals.Properties.forEach(function(property){ _%>
 <%- property.SchemaName %> = "<%- property.Name %>",
<%})_%>
}
```

If you wanted to revert back to the standard templates, just delete the  `_templates` folder
## Installing Globally
If you would rather install dataverse-gen globally you can use:\
`~$ npm install -g dataverse-gen dataverse-auth`

This will then allow you to simply use:\
`~$ dataverse-auth`\
`~$ dataverse-gen`

For more information see the [dataverse-ify project](https://github.com/scottdurow/dataverse-ify/wiki)

Notes:
1. Files differ by case only. If you get an error from the imports in the generated types, it is likely that your file names have the wrong case. dataverse-gen will remember re-use the file name if it exsts when generating - even if the casing is different. The solution is to completely remove all your generated files and regenerated them to get the correct casing.