# transform-values-to-transform-commands

> Takes in an object of transform values and outputs a string of transform commands in a stable order.

Latest version **1.2.0** (published 2019-05-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install transform-values-to-transform-commands
pnpm add transform-values-to-transform-commands
yarn add transform-values-to-transform-commands
bun add transform-values-to-transform-commands
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2019-05-21 |
| First published | 2019-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | ismailman |
| Keywords | matrix, DOMMatrix, unmatrix, decompose matrix, matrix transformations, transforms, transform commands |

## Links

- npm: https://www.npmjs.com/package/transform-values-to-transform-commands
- Repository: https://github.com/ismailman/transform-values-to-transform-commands
- npm.io page: https://npm.io/package/transform-values-to-transform-commands

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2019-05-21
- 1.1.0 — 2019-05-09
- 1.0.1 — 2019-04-08
- 1.0.0 — 2019-04-07

## README

# transform-values-to-transform-commands
Takes in an object of transform values and outputs a string of transform commands in a stable order. Meant to be used with the results of https://github.com/ismailman/decompose-dommatrix  

The values themselves can be strings or numbers. If they are strings then they are assumed to have the unit already associated with them. If it's a number then the function will use a default unit. For translate that is px, rotate is deg, skew is deg, and scale is unitless.

## Usage
```
import transformValuesToTransformCommands from 'transform-values-to-transform-commands';

console.log(
    transformValuesToTransformCommands({
        translateX: 10,
        translateY: 20,
        translateZ: 30,
        rotateX: 10,
        rotateY: 20,
        rotateZ: 30,
        skewXY: '10deg',
        scale: 2
    })
);
```

## API

#### `transformValuesToTransformCommands(transformValues: TransformValues): string`

### TransformValues
#### `translateX, translateY, translateZ: number | string`
#### `rotateX, rotateY, rotateZ: number | string`
#### `skewXY: number | string`
#### `scaleX, scaleY, scaleZ: number | string`

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