# koalas

> Coalesce for JavaScript. Returns the first value that is not undefined or null.

Latest version **1.0.2** (published 2017-04-19) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-04-19 |
| First published | 2013-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Brian Woodward |
| Maintainers | doowb |
| Keywords | check, isnull, kind, koala, koalas, null, type, type-of, typeof, undefined, util, utility, utils, value |

## Links

- npm: https://www.npmjs.com/package/koalas
- Repository: https://github.com/doowb/koalas
- Issues: https://github.com/doowb/koalas/issues
- npm.io page: https://npm.io/package/koalas

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2017-04-19
- 1.0.1 — 2017-02-22
- 1.0.0 — 2017-02-22
- 0.1.1 — 2014-09-30
- 0.0.6 — 2014-03-27
- 0.0.5 — 2014-03-26
- 0.0.4 — 2014-03-26
- 0.0.3 — 2013-12-27
- 0.0.2 — 2013-12-27
- 0.0.1 — 2013-12-27

## README

# koalas [![NPM version](https://img.shields.io/npm/v/koalas.svg?style=flat)](https://www.npmjs.com/package/koalas) [![NPM monthly downloads](https://img.shields.io/npm/dm/koalas.svg?style=flat)](https://npmjs.org/package/koalas)  [![NPM total downloads](https://img.shields.io/npm/dt/koalas.svg?style=flat)](https://npmjs.org/package/koalas) [![Linux Build Status](https://img.shields.io/travis/doowb/koalas.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/koalas) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/koalas.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/koalas)

> Coalesce for JavaScript. Returns the first value that is not undefined or null.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save koalas
```

## Usage

```js
var koalas = require('koalas');
```

## API

### [koalas](index.js#L27)

Coalesce function to find the first valid value. A valid value is one that is not undefined, not null and not NaN (not a number). If no values are valid, then the last argument is returned.

**Params**

* `arguments` **{Mixed}**: Pass in any amount of arguments.
* `returns` **{Mixed}**: First valid value.

**Example**

```js
console.log(koalas(undefined, null, NaN, 'a', 'b'));
//=> 'a'

console.log(koalas(undefined, null, NaN, {a: 'b'}, 'b'));
//=> {a: 'b'}

console.log(koalas(undefined, null, NaN, ['a', 'b', 'c'], {a: 'b'}, 'b'));
//=> ['a', 'b', 'c']

console.log(koalas(undefined, NaN, null));
//=> null
```

## About

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Contributors

| **Commits** | **Contributor** | 
| --- | --- |
| 39 | [doowb](https://github.com/doowb) |
| 1 | [jonschlinkert](https://github.com/jonschlinkert) |

### Building docs

_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_

To generate the readme, run the following command:

```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```

### Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

```sh
$ npm install && npm test
```

### Author

**Brian Woodward**

* [github/doowb](https://github.com/doowb)
* [twitter/doowb](https://twitter.com/doowb)

### License

Copyright © 2017, [Brian Woodward](https://github.com/doowb).
Released under the [MIT License](LICENSE).

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on April 18, 2017._

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