# os2display-grid-generator

> A grid generator for os2display

Latest version **1.0.10** (published 2024-05-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install os2display-grid-generator
pnpm add os2display-grid-generator
yarn add os2display-grid-generator
bun add os2display-grid-generator
```

## 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.10 |
| Published | 2024-05-29 |
| First published | 2021-08-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sine Jespersen |
| Maintainers | itkdev |

## Links

- npm: https://www.npmjs.com/package/os2display-grid-generator
- npm.io page: https://npm.io/package/os2display-grid-generator

## Recent versions

- 1.0.10 (latest) — 2024-05-29
- 1.0.9 — 2023-06-21
- 1.0.8 — 2022-10-26
- 1.0.7 — 2021-08-06
- 1.0.6 — 2021-08-06
- 1.0.5 — 2021-08-06
- 1.0.4 — 2021-08-06
- 1.0.3 — 2021-08-06
- 1.0.2 — 2021-08-06
- 1.0.1 — 2021-08-06
- 1.0.0 — 2021-08-06

## README

# Grid-generator

This is a grid generator for os2display.

## createGrid

Input is columns and rows, from which it creates and returns a string for [grid area templates](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas) css property.

```javascript
createGrid(2, 2);
```

Return:

```
'a b'
'c d'
```

and

```javascript
createGrid(3, 4);
```

Return:

```
'a b c d'
'e f g h'
'i j k l'
```

## createGridArea

Input is an array defining which columns the grid area should span.

output is a string for the [grid-area](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area) css property.

```javascript
createGridArea(["a", "d"]);
```

Return:

```bash
"a / a / d / d"
```

## Testing

With jest

```bash
yarn test
```

## Linting

```bash
check-coding-standards
apply-coding-standards
```

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