# @total-order/key

> Comparison function from key function for JavaScript

Latest version **1.0.0** (published 2021-07-14) · AGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @total-order/key
pnpm add @total-order/key
yarn add @total-order/key
bun add @total-order/key
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-07-14 |
| First published | 2021-04-29 |
| Weekly downloads | 0 |
| License | AGPL-3.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 482.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | make-github-pseudonymous-again |
| Maintainers | aureooms |
| Keywords | attr, compare, key, len, order, total |

## Links

- npm: https://www.npmjs.com/package/@total-order/key
- Repository: https://github.com/total-order/key
- Homepage: https://total-order.github.io/key
- Issues: https://github.com/total-order/key/issues
- npm.io page: https://npm.io/package/@total-order/key

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@backstage/plugin-catalog-backend-module-puppetdb](https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb.md) — 1.3K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2021-07-14
- 0.0.1 — 2021-04-29
- 0.0.0 — 2021-04-29

## README

:old_key: [@total-order/key](https://total-order.github.io/key)
==

Comparison function from key function for JavaScript.
See [docs](https://total-order.github.io/key/index.html).

```js
import {key, len, prop} from '@total-order/key';
import {increasing} from '@total-order/primitive';
import {iterable} from '@total-order/iter';

const order = key(
	iterable(increasing),
	function* (x) {
		yield x['🙀'] * x['🦿'];
		yield x['🤖'];
	}
);
```

[![License](https://img.shields.io/github/license/total-order/key.svg)](https://raw.githubusercontent.com/total-order/key/main/LICENSE)
[![Version](https://img.shields.io/npm/v/@total-order/key.svg)](https://www.npmjs.org/package/@total-order/key)
[![Tests](https://img.shields.io/github/workflow/status/total-order/key/ci:test?event=push&label=tests)](https://github.com/total-order/key/actions/workflows/ci:test.yml?query=branch:main)
[![Dependencies](https://img.shields.io/david/total-order/key.svg)](https://david-dm.org/total-order/key)
[![Dev dependencies](https://img.shields.io/david/dev/total-order/key.svg)](https://david-dm.org/total-order/key?type=dev)
[![GitHub issues](https://img.shields.io/github/issues/total-order/key.svg)](https://github.com/total-order/key/issues)
[![Downloads](https://img.shields.io/npm/dm/@total-order/key.svg)](https://www.npmjs.org/package/@total-order/key)

[![Code issues](https://img.shields.io/codeclimate/issues/total-order/key.svg)](https://codeclimate.com/github/total-order/key/issues)
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/total-order/key.svg)](https://codeclimate.com/github/total-order/key/trends/churn)
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/total-order/key/main.svg)](https://codecov.io/gh/total-order/key)
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/total-order/key.svg)](https://codeclimate.com/github/total-order/key/trends/technical_debt)
[![Documentation](https://total-order.github.io/key/badge.svg)](https://total-order.github.io/key/source.html)
[![Package size](https://img.shields.io/bundlephobia/minzip/@total-order/key)](https://bundlephobia.com/result?p=@total-order/key)

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