# lfsr

> Linear feedback shift register

Latest version **0.0.3** (published 2014-08-21) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2014-08-21 |
| First published | 2014-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/lfsr) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dmitrii Abramov |
| Maintainers | dmitriiabramov |

## Links

- npm: https://www.npmjs.com/package/lfsr
- Repository: https://github.com/dmitriiabramov/lfsr
- Issues: https://github.com/dmitriiabramov/lfsr/issues
- npm.io page: https://npm.io/package/lfsr

## Recent versions

- 0.0.3 (latest) — 2014-08-21
- 0.0.2 — 2014-08-20
- 0.0.1 — 2014-08-19
- 0.0.0 — 2014-08-18

## README

LFSR
=============
Linear feedback shift register using exclusive-or (XOR) as a feedback function written in javascript

[![Build Status](https://travis-ci.org/dmitriiabramov/lfsr.svg?branch=master)](https://travis-ci.org/dmitriiabramov/lfsr)

```javascript
LFSR = require('lfsr');

var bitLength = 10,
    initialState = parseInt('1010101010', 2), // seed
    lfsr = new LFSR(bitLength, initialState);

// get sequence of 10 pseudo-random bits
lfsr.seq(10); // => 1018

// get string representing sequence of 10 pseudo-random bits
lfsr.seqString(10); // => '00001010100'


// Initialize register with default values
// n = 31
lfsr = LFSR();
lfsr.seqString(15) // => '001000010100111'

```

### Runing tests
`npm test`

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