# typewise

> Typewise-structured sorting for arbitrarily complex data structures

Latest version **1.0.3** (published 2015-06-19) · MIT license · 0 weekly downloads

## Install

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

## 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.3 |
| Published | 2015-06-19 |
| First published | 2013-04-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Dean Landolt |
| Maintainers | deanlandolt |
| Keywords | typewise, types, compare, sort, order, collation, complex, structures, leveldb, indexeddb, keyvalue |

## Links

- npm: https://www.npmjs.com/package/typewise
- Repository: https://github.com/deanlandolt/typewise
- Issues: https://github.com/deanlandolt/bytewise/issues
- npm.io page: https://npm.io/package/typewise

## Dependencies (1)

- [typewise-core](https://npm.io/package/typewise-core.md) ^1.2.0

## 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.3 (latest) — 2015-06-19
- 1.0.2 — 2015-05-14
- 1.0.1 — 2015-05-11
- 1.0.0 — 2015-05-11
- 0.8.2 — 2015-03-18
- 0.8.1 — 2015-03-16
- 0.7.0 — 2013-11-26
- 0.6.0 — 2013-09-23
- 0.5.0 — 2013-06-21
- 0.4.0 — 2013-04-22
- 0.3.0 — 2013-04-21

## README

# typewise

Typewise structured sorting for arbirarily complex data structures.

[![build status](https://travis-ci.org/deanlandolt/typewise.svg?branch=master)](https://travis-ci.org/deanlandolt/typewise)

This library defines and implements the collation used by the [bytewise](https://github.com/deanlandolt/bytewise-core) encoding library.

NOTE: the core typewise sorting functionality has been completely rewritten and moved to [typewise-core](https://github.com/deanlandolt/typewise-core). This library extends the data structures and comparators available to support more exotic types like ordered maps and sets, and shortlex-ordered tuples and records.


## Type system

In order to properly express the rules for sorting and equality for a wide range of structures `typewise` defines a simple type system for controlling these properties across a range of data structures.

A `typewise` type profile can be provide when creating a bytewise codec to control encoding and decoding behavior for specific types. Types may also contain high and low sentinal values that can be used to create `range` types which may be impossible be instantiate directly as instances.

For example, dates have no valid infinatary instances, but something analogous to the "minimum" and "maximum" dates is a useful construct for defining date intervals.


## Issues

Issues should be reported [here](https://github.com/deanlandolt/bytewise/issues).


## License

[MIT](http://deanlandolt.mit-license.org/)

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