# alive

> A JS implementation of Conway's Game of Life.

Latest version **0.0.2** (published 2012-01-30) · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2012-01-30 |
| First published | 2012-01-30 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.4.x |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Jamison Dance |
| Maintainers | jergason |
| Keywords | game, life, conway |

## Links

- npm: https://www.npmjs.com/package/alive
- Repository: https://github.com/jergason/alive
- npm.io page: https://npm.io/package/alive

## Recent versions

- 0.0.2 (latest) — 2012-01-30

## README

# Life.js

Life.js is an implementation of Conway's Game of Life in JavaScript. It should
work in both the browser and node.js.


## Installation

```bash
npm install life
```

## Usage

Life.js is packaged as a CommonJS module, which means it exports a function to a
global `module.exports` object. To use it in Node.js, just `require` it.

```JavaScript
// Node.js
var Life = require('alive')
  , life
```
To use in the browser, you need to define a global `module` object before you
load Alive.

```HTML
<head>
  <script type='text/javascript'>
    window.module = {};
  </script>
  <script type='text/javascript' src='alive.js'></script>
```

Your actual app code would look something like this.

```JavaScript
// size of the grid
life = new Life(64);
life.getCell(0, 0); // initialized to zero
life.setCell(0, 0, 1); // turn on a cell
life.setCell(0, 1, 1);
life.setCell(1, 1, 1);
life.tick()
```

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