open-index/open-npm huggingface dataset:
npm package: @pravodev/sharding-to-csv
Description: A simple package to shard big Csv files into small files.
Author: Anderson Vinicius avincius.adorno@gmail.com
Latest version: 1.0.3

# Sharding to CSV

> Break a large csv file into small parts.

# Install
```
$ npm install sharding-to-csv
```

# Tests

```
$ npm install
$ npm test
```

# What is it?

A simple NodeJS module that breaks large csv files into small files to allow manipulation on applications with memory restrictions.

# API
## Parameters:
- `file` - The file path.
- options:
    - `encoding` - encoding to use with read and write streams.
    - `maxFileSize` - determines the size of partitioned files.

## Return:
- EventEmitter

# Using
```javascript
var ShardingToCsv = require('sharding-to-csv').ShardingToCsv;

var sharding = new ShardingToCsv('./path/file.csv',
    { encoding: 'iso-8859-1', maxFileSize: 10485760 }).shard();

sharding.on('completed', () => console.log('completed'));

sharding.on('error', err => console.log(err));
```

## License
- MIT
npm package: @prawn-cake/react-input-debouncer
Description: Zero dependencies text input debounce function for react
Author: Maksim Ekimovskii
Latest version: 1.0.0

# react-input-debouncer

## Why ?
Are you familiar with a problem of poor performance 
when filtering list of items using by the input text?

A typical solution is to debounce an input change for some milliseconds. 
And many libraries exist to solve it, including famous [lodash debounce](https://lodash.com/docs/4.17.10#debounce).

Few issues with them: 

* Many of those libraries are wrappers around lodash.
* Libraries provide wrapper input components which is totally redundant

This library just provides react specific `debounce` function to use it with regular html input.


## Install

    npm install --save @prawn-cake/react-input-debouncer
    
    # OR
    yarn add @prawn-cake/react-input-debouncer
    

## Usage

Here I use `useState` hook, one of latest and greatest [react hooks](https://reactjs.org/docs/hooks-intro.html) features.

    import { useState } from 'react'
    import debounce from 'react-input-debouncer'
    
    function MyComponent({ props }) {
        [value, setValue] = useState(''); 
        return (
            <React.Fragment>
                ...
                <label>{value}</label>
                <input 
                    type="text"
                    onChange={debounce(e => setValue(e.target.value), 100)}
                />
            </React.Fragment>
        )
    }
    
`MyComponent` renders a fragment with a label and a text input elements. 
Text input is debounced for 100ms.
npm package: @praxis.gdn/promise-task
Description: Lazy promises with support for cancellation and progress events
Author: ack@praxis.gdn
Latest version: 1.0.0

Lazy promises with progress and cancelation.

## Installation

```sh
npm install promise-task
```

## Usage

Use a task anywhere you would use a promise, with a few minor changes.

```javascript
const Task = require("promise-task");

let task = new Task((context) => {
	let progress = 0;
	let timer;
	timer = setInterval(() => {
		progress += 1;
		if(progress >= 100) {
			clearTimeout(timer);
			context.progress(100);
			context.resolve(true);
		} else {
			context.progress(progress);
		}
	}, 100);

	context.onCancel = () => {
		clearTimeout(timer);
	};
});

task.on("progress", (progress) => console.log(progress));
await task.run();
```

### Task#constructor

Create a new task by `new Task(executor)`.

* `executor (Function)` accepts a single argument, `context`.

### Task#run()

Invoke this to begin executing the task. Returns a `Promise` that is resolved or rejected when the task completes.

### Task#progress()

Returns the current progress as number.

### Task#cancel()

Cancels execution and rejects the associated promise.

### Task#isCanceled()

Returns true if the task is canceled, false otherwise.

### Task#clone()

Creates a copy of a task instance.

### Task#series(tasks)

Returns a new `Task` that wraps one or more tasks that are executed one-at-a-time.

`tasks (Array)`: A list of tasks to execute in series when `run()` is invoked.

### Task.error

Task property that contains the last `Error` if there is one, or null.

### Context#resolve(result)

Invoke this from the `executor` to resolve the associated promise.

* `result (Any)`: The successful result of the completed task.

### Context#reject(error)

Invoke this from the `exectutor` to reject the associated promise.

* `error (Error)`: An error explaining why the task failed.

### Context#progress(value)

Invoke this from the `executor` to update the task progress.

* `value`: A number between 0 and 100 (inclusive).

### Context.onCancel(callback)

Set this property to the callback that should be invoked if the task is canceled. This property is only writable, and cannot be read.

* `callback (Function)`: A callback function invoked when `Task.cancel()` is called.