open-index/open-npm huggingface dataset:
npm package: @laverdet/lokesh-colorthief
Description: Get the dominant color or color palette from an image.
Author: Lokesh Dhakar
Latest version: 2.3.2


# Color Thief

Grab the color palette from an image using just Javascript.Works in the browser and in Node.

### View the [demo page](https://lokeshdhakar.com/projects/color-thief/) for examples, API docs, and more.

---

## Contributing

### Project structure

+ `build/` - Simple script that copies and renames files into the /dist folder.
+ `cypress/` - Browsers tests.
+ `dist/` - Generated distribution files created by [microbundle](https://github.com/developit/microbundle) package and a couple of files copied via build script.
+ `examples/` - CSS, JS, and Images for the index.html example page.
+ `src/color-thief-node.js` - Source for the Node (commonjs) compatible version of the script.
+ `src/color-thief.js` - Source for the browser (ES6, AMD, Global var) compatible version of the script.
+ `src/core.js` - Functions shared between the node and browser versions of the script.
+ `test/` - Node integration tests. Uses Chai.
+ `index.html` - Example page.

### Running tests

There are two sets of tests:

1. Browser tests run with [Cypress](https://www.cypress.io)
2. Node tests run with [Karma](https://karma-runner.github.io/latest/index.html) and utilizing [Mocha](https://mochajs.org/)

To run both the browser and Node tests:

- `npm run dev` to start local server.
- `npm run test`

To run just the browser tests with the Cypress UI:

- `npm run dev` to start local server
- `npm run test:browser`

To run just the Node tests:

- `npm run test:node`


### Adding tests

- Update `cypress/test-pages/index.html` as needed or create a new test page if you need new examples.
- Add new tests in `cypress/integration/apis_spec.js`

### Making a new release

- Merge `dev` into `master`
- Pull down `master`
- Update version number in `src/color-thief.js` and `package.json`
- Run `npm run build`
- Commit and push built files back up to `master`
- Create a new Github release along with tag. Naming convention for both ```v2.8.1```
- `npm publish`
npm package: @laverdet/lokesh-quantize
Description: A node.js module for color quantization, based on Leptonica.
Author: Olivier Lesnicki
Latest version: 1.2.0

quantize
========

Node.js module for color quantization, based on Leptonica.


Install
-------

	npm install quantize

Quick Overview
--------------

### Usage

`````javascript
var quantize = require('quantize');

var arrayOfPixels = [[190,197,190], [202,204,200], [207,214,210], [211,214,211], [205,207,207]];
var maximumColorCount = 4;

var colorMap = quantize(arrayOfPixels, maximumColorCount);
`````

* `arrayOfPixels` - An array of pixels (represented as [R,G,B arrays]) to quantize
* `maxiumColorCount` - The maximum number of colours allowed in the reduced palette

##### Reduced Palette

The `.palette()` method returns an array that contains the reduced color palette.

`````javascript
// Returns the reduced palette
colorMap.palette(); 
// [[204, 204, 204], [208,212,212], [188,196,188], [212,204,196]]
`````

##### Reduced pixel

The `.map(pixel)` method maps an individual pixel to the reduced color palette.

`````javascript
// Returns the reduced pixel
colorMap.map(arrayOfPixels[0]);
// [188,196,188]
`````

Author
------

* [Olivier Lesnicki](https://github.com/olivierlesnicki)

Contributors
------------

* [Nick Rabinowitz](https://github.com/nrabinowitz)
* [Mike Bostock](https://github.com/mbostock)

License
-------

Licensed under the MIT License.
npm package: @laverve/eslint-utils
Description: This module offers a set of utils for linting.
Author: Victor Pishuk
Latest version: 5.3.7
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @laverve/test-utils

This module provides test utilities.

Dependencies:
1. [Jest](https://jestjs.io/)

# Installation

## Inside application
1. Install dependencies
```
npm i --save @laverve/test-utils
```

2. Add `jest.config.ts` file in your root folder
```
import type { Config } from "jest";
import { jestConfig } from "@laverve/test-utils";

const config: Config = {
    ...jestConfig
};

export default config;


```
npm package: @laverve/timer
Description: This module offers a Timer component.
Author: Victor Pishuk
Latest version: 4.0.2

# LaVerve Timer

This package provides a component to display timer using [React](https://react.dev/) framework.

# Installation
Run the following command to install timer in your repository:

```
npm i @laverve/timer
```

# Usage

## Count up timer

```
import { Timer, useTimer } from "@laverve/timer"

// ....

const { seconds, minutes, timeLeftPercents } = useTimer( {type: "countup", isCounting: true});
<Timer seconds={seconds} minutes={minutes} />
```

## Count down timer

```
import { Timer, useTimer } from "@laverve/timer"

// ....

const { seconds, minutes, timeLeftPercents } = useTimer( {type: "countdown", isCounting: true});
<Timer seconds={seconds} minutes={minutes} timeLeftPercents={timeLeftPercents} />

```

# Timer component

## Properties

### classNames
Default value: `<empty string>`.

You can use this property to slightly modify the look and feel of a timer component. The provided class names will be applied to the root container of a component.

### viewStyle

#### viewStyle.defaultColor
Default value: `rgba(17, 17, 17, 0.20)`.

This property defines color of a timer's circle when timer counts up.

#### viewStyle.colorFrom
Default value: `#67B747`.

This property defines a starting color of a timer's circle when timer counts down.

#### viewStyle.colorTo
Default value: `#C54555`.

This property defines an ending color of a timer's circle when timer counts down.

### seconds
Required.

Type: `number`

Use this property to display seconds.

### minutes
Required.

Type: `number`

Use this property to display minutes.

### timeLeftPercents
Default value: `0`.

Type: `number`

Use this property to display how much time does user still have to complete the game. Keep it equl to `0` if timer works in times up mode.


# useTimer hook

## Options

### timeout
Default value: `0`.

Type: `number`

Use this property to define how much time shall be measured.

### viewStyle
Default value: `countup`.

Values: `countup` or `countdown`.

Use this property to define timer's behavior.

### isCounting
Default value: `false`.

Type: `boolean`

Use this property to control when to start timer.

### onTimeOut
Default value: `undefined`.

Type: `Function`

Use this property to react when time is up.


## Returns

The hook return an object that you can use to determine timer's state and pass to Timer component.

```
{
    timeLeft: <number>, // eq to 0 when time is up or timer is in countup mode
    timeLeftPercents: <number>, // in a range from 0 to 100, eq to 0 when time is up or timer is in countup mode
    minutes: <number>, // amount of minutes left or spent, depends on a type of a timer
    seconds: <number>, // amount of seconds left or spent, depends on a type of a timer
    startTime: <number | null>, // indicates a time when timer was started
    endTime: <number | null>, // indicates a time when timer was stopped
    isCounting: <boolean> // shows if the timer is running right now
    reset: () => void // resets timer to initial state
}
```

# License

@laverve/timer is licensed under the MIT license. MIT
npm package: @laverve/use-parent-size
Description: This module offers a small but usefull hook that allows users to monitor size of a parent element.
Author: Victor Pishuk
Latest version: 4.0.3

# @laverve/use-parent-size

This module offers a small but usefull [React](https://react.dev/) hook that allows users to monitor size of a parent element.

# Installation
Run the following command to install timer in your repository:

```
npm i @laverve/use-parent-size
```

# Usage

```
import { useParentSize } from "@laverve/use-parent-size"

// ....

const { width, height, ref } = useParentSize();
<div style={{width: "100%", height: "100%"}} minutes={ref} />
```

# License

@laverve/use-parent-size is licensed under the MIT license. MIT
npm package: @lavikara/testsdk
Description: Prime bank sdk
Author: lavikara
Latest version: 0.0.45

## Table of Contents

- [Features](#features)
- [Installing](#installing)
  - [Package manager](#package-manager)
- [Example](#example)

## Features

- Fund any account using virtual account from the browser
- Fund any account using virtual account from node.js

## Installing

### Package manager

Using npm:

```bash
$ npm install @primebank/primebank
```

Using yarn:

```bash
$ yarn add @primebank/primebank
```

Once the package is installed, you can import the library using `import` or `require` approach:

```js
import primebank from "@primebank/primebank";
OR;
import { fundWithVirtualAccount } from "@primebank/primebank";
```

```js
const primebank = require("@primebank/primebank");
```

## Example

```js
import { fundWithVirtualAccount } from "@primebank/primebank";

// Make a request to generate virtual account
const details = {
  reference: "29F83ND82JD0",
  amount: "10000000",
  email: "customer@gmail.com",
  fullName: "Adewale Johnson",
  phone: "+2348144582144",
};
fundWithVirtualAccount("apiKey", details, options)
  .then((response) => {
    // handle success
    console.log(response);
  })
  .catch((error) => {
    // handle error
    console.log(error);
  });

// Want to use async/await? Add the `async` keyword to your outer function/method.
const generateVirtualAccount = async () => {
  try {
    const response = await fundWithVirtualAccount("apiKey", details, options);
    console.log(response);
  } catch (error) {
    console.error(error);
  }
};

// Optionally the request above could also be done as
import primebank from "@primebank/primebank";
//const primebank = require('@primebank/primebank'); // legacy way

const details = {
  reference: "29F83ND82JD0",
  amount: "10000000",
  email: "customer@gmail.com",
  fullName: "Adewale Johnson",
  phone: "+2348144582144",
};
primebank
  .fundWithVirtualAccount("apiKey", details, options)
  .then((response) => {
    // handle success
    console.log(response);
  })
  .catch((error) => {
    // handle error
    console.log(error);
  });

// Want to use async/await? Add the `async` keyword to your outer function/method.
const generateVirtualAccount = async () => {
  try {
    const response = await primebank.fundWithVirtualAccount(
      "apiKey",
      details,
      options
    );
    console.log(response);
  } catch (error) {
    console.error(error);
  }
};
```

> **Note**: `async/await` is part of ECMAScript 2017 and is not supported in Internet
> Explorer and older browsers, so use with caution.