{"id":15686254,"url":"https://github.com/doowb/koalas","last_synced_at":"2025-05-07T02:43:16.909Z","repository":{"id":12801166,"uuid":"15475029","full_name":"doowb/koalas","owner":"doowb","description":"Coalesce for JavaScript. Returns the first value that is not undefined or null.","archived":false,"fork":false,"pushed_at":"2017-04-19T13:28:42.000Z","size":33,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T20:44:45.912Z","etag":null,"topics":["coalesce","default"],"latest_commit_sha":null,"homepage":"https://github.com/doowb/koalas","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doowb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-27T14:14:16.000Z","updated_at":"2022-12-28T06:00:02.000Z","dependencies_parsed_at":"2022-08-31T13:50:30.011Z","dependency_job_id":null,"html_url":"https://github.com/doowb/koalas","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fkoalas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fkoalas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fkoalas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fkoalas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/koalas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252802607,"owners_count":21806537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coalesce","default"],"created_at":"2024-10-03T17:37:03.733Z","updated_at":"2025-05-07T02:43:16.867Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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\u0026label=Travis)](https://travis-ci.org/doowb/koalas) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/koalas.svg?style=flat\u0026label=AppVeyor)](https://ci.appveyor.com/project/doowb/koalas)\n\n\u003e Coalesce for JavaScript. Returns the first value that is not undefined or null.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save koalas\n```\n\n## Usage\n\n```js\nvar koalas = require('koalas');\n```\n\n## API\n\n### [koalas](index.js#L27)\n\nCoalesce 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.\n\n**Params**\n\n* `arguments` **{Mixed}**: Pass in any amount of arguments.\n* `returns` **{Mixed}**: First valid value.\n\n**Example**\n\n```js\nconsole.log(koalas(undefined, null, NaN, 'a', 'b'));\n//=\u003e 'a'\n\nconsole.log(koalas(undefined, null, NaN, {a: 'b'}, 'b'));\n//=\u003e {a: 'b'}\n\nconsole.log(koalas(undefined, null, NaN, ['a', 'b', 'c'], {a: 'b'}, 'b'));\n//=\u003e ['a', 'b', 'c']\n\nconsole.log(koalas(undefined, NaN, null));\n//=\u003e null\n```\n\n## About\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 39 | [doowb](https://github.com/doowb) |\n| 1 | [jonschlinkert](https://github.com/jonschlinkert) |\n\n### Building docs\n\n_(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.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning 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:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Brian Woodward**\n\n* [github/doowb](https://github.com/doowb)\n* [twitter/doowb](https://twitter.com/doowb)\n\n### License\n\nCopyright © 2017, [Brian Woodward](https://github.com/doowb).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on April 18, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fkoalas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Fkoalas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fkoalas/lists"}