# carrying

> A functional JavaScript library that carries you towards happier and better code.

Latest version **0.0.15** (published 2016-06-06) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install carrying
pnpm add carrying
yarn add carrying
bun add carrying
```

## 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.0.15 |
| Published | 2016-06-06 |
| First published | 2016-05-23 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jesper Håkansson |
| Maintainers | drager |
| Keywords | functional functions, functional, range, zip, foldl, scan, curry, currying |

## Links

- npm: https://www.npmjs.com/package/carrying
- Repository: https://github.com/drager/carrying
- Homepage: https://github.com/drager/carrying#readme
- Issues: https://github.com/drager/carrying/issues
- npm.io page: https://npm.io/package/carrying

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.0.15 (latest) — 2016-06-06
- 0.0.14 — 2016-05-31
- 0.0.13 — 2016-05-30
- 0.0.12 — 2016-05-26
- 0.0.11 — 2016-05-25
- 0.0.10 — 2016-05-25
- 0.0.9 — 2016-05-25
- 0.0.8 — 2016-05-25
- 0.0.7 — 2016-05-24
- 0.0.6 — 2016-05-24
- 0.0.5 — 2016-05-23
- 0.0.4 — 2016-05-23
- 0.0.3 — 2016-05-23
- 0.0.2 — 2016-05-23
- 0.0.1 — 2016-05-23

## README

# Carrying
[![Build Status](https://travis-ci.org/drager/carrying.svg?branch=master)](https://travis-ci.org/drager/carrying)

A functional JavaScript library that carries you towards happier and better code.

## Why?
Because JavaScript (as is at the moment) lacks some great functions built into the language.
A lot of other languages provides similar functions that this library provides.
Mainly functional languages, which this library has taken it's inspiration from. So this is simply a
functional JavaScript library which provides some useful functions that JavaScript currently lacks.

## Installation
```
npm install --save carrying
```

## Usage
Just import the functions you want to use:

```js
import {concat, intersperse, uncons, range, transpose} from 'carrying'

uncons(range(1, 11)) // => [[1], [2, 3, 4, 5, 6, 7, 8, 9, 10]]
uncons([1, 2, 3]) //=> [[1], [2, 3]]
uncons([]) //=> undefined

uncons('abc') //=> [['a'], ['b', 'c']]
uncons('ze') // => [['z'], ['e']]
uncons('q') // => ['q']
uncons('') //=> undefined

range(1, 3) // => [1, 2]
range(5, 11) // => [5, 6, 7, 8, 9, 10]

range(10, 9) // => []
range(2, 2) // => []

range(1, 10, 2) // => [1, 3, 5, 7, 9]

transpose([[1, 2, 3], [4, 5, 6]]) // => [[1, 4], [2, 5], [3, 6]]
transpose([[10, 11], [20], [], [30, 31, 32]]) // => [[10, 20, 30], [11, 31], [32]]

concat(intersperse(' ', ['intersperse', 'is', 'a', 'fun', 'function', '!'])) // => 'intersperse is a fun function !'
```

Any carrying module can be imported individually if you prefer that:
```js
import {takeWhile} from 'carrying/lib/takeWhile'

takeWhile(a => a < 3, [1, 2, 3, 4, 1, 2, 3, 4]) // => [1, 2]
```

## Documentation
Documentation is available online at: http://drager.github.io/carrying/

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