# fen-analyzer

> Chess FEN (Forsyth-Edwards Notation) positions analyzer. Having FEN as input helps to identify, e.g. how many pieces left on the board

Latest version **0.3.1** (published 2019-09-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install fen-analyzer
pnpm add fen-analyzer
yarn add fen-analyzer
bun add fen-analyzer
```

## 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.3.1 |
| Published | 2019-09-16 |
| First published | 2017-09-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 17 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mikhail Subach |
| Maintainers | scorpibear |
| Keywords | chess, FEN, analyzer, position, pieces |

## Links

- npm: https://www.npmjs.com/package/fen-analyzer
- Repository: https://github.com/Scorpibear/fen-analyzer
- Homepage: https://github.com/Scorpibear/fen-analyzer#readme
- Issues: https://github.com/Scorpibear/fen-analyzer/issues
- npm.io page: https://npm.io/package/fen-analyzer

## Recent versions

- 0.3.1 (latest) — 2019-09-16
- 0.3.0 — 2019-09-03
- 0.2.0 — 2018-09-11
- 0.1.0 — 2017-09-19

## README

# fen-analyzer
[![Build Status](https://travis-ci.org/Scorpibear/fen-analyzer.svg?branch=master)](https://travis-ci.org/Scorpibear/fen-analyzer)
[![Coverage Status](https://codecov.io/gh/Scorpibear/fen-analyzer/branch/master/graph/badge.svg)](https://codecov.io/gh/Scorpibear/fen-analyzer)
[![npm version](https://badge.fury.io/js/fen-analyzer.svg)](https://www.npmjs.com/package/fen-analyzer)

Chess FEN (Forsyth-Edwards Notation) positions analyzer. Having FEN as input helps to identify, e.g. how many pieces left on the board

## Example
```javascript
const fenAnalyzer = require('fen-analyzer');

const piecesCount = fenAnalyzer.getPiecesCount('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1')
 // piecesCount === 32

const isBlack = fenAnalyzer.isBlack('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1') // isBlack === false

const fen = 'rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1';
fen = fenAnalyzer.normalize(fen);
 // fen === 'rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1'



```

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