# q-tools

> Extends Q with each and map.

Latest version **0.1.1** (published 2015-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install q-tools
pnpm add q-tools
yarn add q-tools
bun add q-tools
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-08-03 |
| First published | 2015-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ben Loveridge |
| Maintainers | jaroml, bloveridge |
| Keywords | q |

## Links

- npm: https://www.npmjs.com/package/q-tools
- Repository: https://github.com/gradecam/nodejs-q-tools
- Homepage: https://github.com/gradecam/nodejs-q-tools#readme
- Issues: https://github.com/gradecam/nodejs-q-tools/issues
- npm.io page: https://npm.io/package/q-tools

## Dependencies (2)

- [q](https://npm.io/package/q.md) ^1.4.1
- [lodash](https://npm.io/package/lodash.md) ^3.9.1

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2015-08-03
- 0.1.0 — 2015-07-10

## README

q-tools
=========

Extends [Q](https://github.com/kriskowal/q) with `map` and `each` methods.

Allows execution of a particular function for every value in an array. If the array
contains promises the supplied function will not be called until all promises have been
resolved.

## map

`map` returns an array with the results of calling `fn` for each item in the array.

```javascript
function double(x) {
    return x * 2;
}

var doubled = Q.map(original, double);

// if you want to do parallel processing use mapAsync instead.
var doubledParallel = Q.mapAsync(original, double);
```

## each

`each` returns the original array after having called `fn` for each item. Use this method instead
of map if you don’t need the transformed values.

```javascript
function double(x) {
    return x * 2;
}

Q.each(original, double);

// process `original` in parallell
Q.eachAsync(original, double);
```

---
_Source: https://npm.io/package/q-tools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
