gridl

A modern ES6 toolbox for grid-based data.

Selectors

Easily select cells, columns, rows, sub grids or neighbouring cells with selector functions.

Transformers

Do all sorts of data transformations on your grid like adding, removing, rotating, swapping, mirroring and more.

Traversable

Traverse over your grid in variety of ways. Choose from a predefined set of walker functions or just come up with your own one.

ES6 Modules

Use only the parts you need and keep your bundle size as small as possible with treeshaking. Alternatively, there is also a UMD bundle.

Immutable

The grid data structures is immutable. This aligns well with applications using a flux architecture like React and Redux.

Typed

Since gridl is written in TypeScript it naturally comes with complete and up-to-date type definitions.

Installation

In a browser

<script src="https://cdn.jsdelivr.net/npm/gridl@latest/_umd/index.min.js"></script>

Using npm

$ npm install gridl

Using yarn

$ yarn add gridl

ES6 modules

import {createGrid} from "gridl/core";
import {mirrorHorizontally} from "gridl/transformers";

Node.js

const {createGrid, mirrorHorizontally} = require("gridl/_umd)";