open-index/open-npm huggingface dataset:
npm package: @shekanger/color-thief
Description: Get the dominant color or color palette from an image.
Latest version: 0.0.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: @shekhei/pkginfo
Description: An easy way to expose properties on a module from a package.json
Author: Charlie Robbins
Latest version: 0.3.0

# node-pkginfo

An easy way to expose properties on a module from a package.json

## Installation

### Installing npm (node package manager)
```
  curl http://npmjs.org/install.sh | sh
```

### Installing pkginfo
```
  [sudo] npm install pkginfo
```

## Motivation
How often when writing node.js modules have you written the following line(s) of code? 

* Hard code your version string into your code

``` js
  exports.version = '0.1.0';
```

* Programmatically expose the version from the package.json

``` js
  exports.version = require('/path/to/package.json').version;
```

In other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!**

## Usage

Using `pkginfo` is idiot-proof, just require and invoke it. 

``` js
  var pkginfo = require('pkginfo')(module);
  
  console.dir(module.exports);
```

By invoking the `pkginfo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`). 

Here's a sample of the output:

```
  { name: 'simple-app',
    description: 'A test fixture for pkginfo',
    version: '0.1.0',
    author: 'Charlie Robbins <charlie.robbins@gmail.com>',
    keywords: [ 'test', 'fixture' ],
    main: './index.js',
    scripts: { test: 'vows test/*-test.js --spec' },
    engines: { node: '>= 0.4.0' } }
```

### Expose specific properties
If you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function:

``` js
  var pkginfo = require('pkginfo')(module, 'version', 'author');
  
  console.dir(module.exports);
```

```
  { version: '0.1.0',
    author: 'Charlie Robbins <charlie.robbins@gmail.com>' }
```

If you're looking for further usage see the [examples][0] included in this repository. 

## Run Tests
Tests are written in [vows][1] and give complete coverage of all APIs.

```
  vows test/*-test.js --spec
```

[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples
[1]: http://vowsjs.org

#### Author: [Charlie Robbins](http://nodejitsu.com)
#### License: MIT
npm package: @sheknows/swagger-js-client
Description: SheKnows universal Swagger JS client
Latest version: 2.0.0

# SheKnows Universal Swagger JS Client

## Description ##
[SheKnows Universal Swagger](https://github.com/sheknows/swagger-js-client) JS Client.

## Installation

``` bash
# install dependencies
$ npm install

# build for production
$ npm run build

# run tests
npm test

```

## Usage
```js
import getClient from 'swagger-js-client'

getClient({
  host: 'HOST', // (or swaggerUrl)
  key: 'KEY',
  secret: 'SECRET'
})
  .then(client => client.apis['TAG_NAME']['METHOD_NAME'](params))
  .then(data => {
    console.log(data.body)
  })
  .catch(err => {
    console.error('Oops:', err)
  })
```
For more examples, please refer to the test directory.

## Update client
Because this client is generated on-the-fly by dynamically consuming `swagger.json`, no client update (often referred to as "regeneration") is needed.

If you would like to update the client's code however:
- `npm run build`
- bump the version
  - `npm version $version` where `$version` is `<newversion>`, `major`, `minor` or `patch` (for more info see [NPM docs](https://docs.npmjs.com/cli/version))

After the code is merged to master, run `npm publish`.

:warning: Make sure all [Tests](#Tests) are passing after updates.
npm package: @shelacek/formica
Description: Preact forms made easy!
Author: Ales Kurecka
Latest version: 2.0.2

# Formica

[![npm](https://img.shields.io/npm/v/@shelacek/formica.svg)](https://www.npmjs.com/package/@shelacek/formica)
[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shelacek/formica.svg)](https://bundlephobia.com/result?p=@shelacek/formica)

*Preact forms made easy!*

See documentation on [shelacek.bitbucket.io/formica](https://shelacek.bitbucket.io/formica).

```jsx
<Form value={form} onChange={this.handleChange} onSubmit={this.handleSubmit}>
	<label>Name: <input name="name" type="text" required /></label>
	<FormGroup name="info">
		<label>Bio: <textarea name="bio" maxLength="250" /></label>
		<label>Website: <input name="web" type="text" pattern="(http://|https://)\S{1,63}" /></label>
	</FormGroup>
	<button type="submit">Submit form</button>
</Form>
```

## Features

- Close to native: write forms like you do in plain HTML
- Reactive: the data in the form are those that are in the component state and vice versa
- Freedom: you can directly use native inputs, create custom inputs or incorporate third party ones
- Use this.state, hooks or signals, class components or functional components. Your project, your rules!
- Light as a feather: only ~2.2kiB mingzipped and without dependencies (except Preact)


[Changelog] | [Create an issue]

[Changelog]: https://bitbucket.org/shelacek/formica/src/master/CHANGELOG.md
[Create an issue]: https://bitbucket.org/shelacek/formica/issues
npm package: @shelacek/plotery
Description: Fast and lightweight plotting library for Preact without fuss.
Author: Ales Kurecka
Latest version: 1.1.3

# Plotery

[![npm](https://img.shields.io/npm/v/@shelacek/plotery.svg)](https://www.npmjs.com/package/@shelacek/plotery)
[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shelacek/plotery.svg)](https://bundlephobia.com/result?p=@shelacek/plotery)

*Fast and lightweight plotting library for Preact without fuss.*

![Screenshot of some Plotery graph](https://bitbucket.org/shelacek/plotery/raw/master/screenshot.png)

See documentation on [shelacek.bitbucket.io/plotery](https://shelacek.bitbucket.io/plotery).

```jsx
<Chart data={data}>
	<LinearAxis type="x" min={0} max={100} />
	<LinearAxis type="y" min={-10} max={10} />
	<LinearLine />
</Chart>
```


## Features

- Plotery generate SVG markup and let the browser do the rest
- Declarative configuration: It's Preact library, so why not use JSX?
- Small footprint: don't burn bits for sporadically used features
- Easily extensible
- Styled with CSS


[Changelog] | [Create an issue]

[Changelog]: https://bitbucket.org/shelacek/plotery/src/master/CHANGELOG.md
[Create an issue]: https://bitbucket.org/shelacek/plotery/issues