# factorial-calculator

> A function that calculates the factorial of a given "n" number

Latest version **2.1.0** (published 2023-04-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install factorial-calculator
pnpm add factorial-calculator
yarn add factorial-calculator
bun add factorial-calculator
```

## 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 | 2.1.0 |
| Published | 2023-04-03 |
| First published | 2023-04-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Gonzalo Vidal |
| Maintainers | gsvidal |
| Keywords | factorial |

## Links

- npm: https://www.npmjs.com/package/factorial-calculator
- Repository: https://github.com/gsvidal/factorial-calculator
- Issues: https://github.com/gsvidal/factorial-calculator/issues
- npm.io page: https://npm.io/package/factorial-calculator

## Recent versions

- 2.1.0 (latest) — 2023-04-03
- 2.0.0 — 2023-04-03
- 1.11.0 — 2023-04-03
- 1.10.0 — 2023-04-03
- 1.9.0 — 2023-04-03
- 1.8.0 — 2023-04-03
- 1.7.0 — 2023-04-03
- 1.6.0 — 2023-04-03
- 1.5.0 — 2023-04-03
- 1.4.0 — 2023-04-03
- 1.3.0 — 2023-04-03
- 1.2.0 — 2023-04-03
- 1.1.0 — 2023-04-03
- 1.0.0 — 2023-04-02

## README

# factorial-calculator
A simple module to calculate the factorial of a number

## Installation
Install via NPM:

```bash

npm install factorial-calculator

```

## Usage

#### JavaScript (node)

```javascript

const factorial = require("factorial-calculator/dist-node");

factorial(5); // 5*4*3*2*1 -> 120

```

#### TypeScript / JavaScript

```typescript

import factorial from 'factorial-calculator/src';

factorial(4); // 4*3*2*1 -> 24

```

If function's argument less than 0 (negative number) or not a number at all the factorial function will return NaN

## Repo

[https://github.com/gsvidal/factorial-calculator](https://github.com/gsvidal/factorial-calculator)

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