<commit_before># Pokémon Damage Calculator

![Test Status](https://github.com/smogon/damage-calc/workflows/Tests/badge.svg)
[![npm version](https://img.shields.io/npm/v/@smogon/calc.svg)](https://www.npmjs.com/package/@smogon/calc)&nbsp;

Damage calculator for all generations of Pokémon battling.

If you are currently looking at [smogon/damage-calc][0] and not
a fork, this is the official repository for the Pokémon Showdown! damage calculator:
https://calc.pokemonshowdown.com.

This repository houses both the package implementing the core damage formula mechanics in each
generation ([`@smogon/calc`][1]) as well as [logic and markup for the official UI][2].

## `@smogon/calc`

The `@smogon/calc` package powers the UI, providing a programmatic interface for computing damage
ranges. This subpackage contains code that will run on both the server or browser and can be used
as a building block for alternative UIs or applications.

### Installation

```sh
$ npm install @smogon/calc
```

Alternatively, as [detailed below](#browser), if you are using `@smogon/calc` in the browser and want
a convenient way to get started, simply depend on a transpiled and minified version via [unpkg][5]:

```html
<script src="https://unpkg.com/@smogon/calc/data/production.min.js"></script>
<script src="https://unpkg.com/@smogon/calc"></script><commit_msg>Fix broken link in README.md (#431)<commit_after># Pokémon Damage Calculator

![Test Status](https://github.com/smogon/damage-calc/workflows/Tests/badge.svg)
[![npm version](https://img.shields.io/npm/v/@smogon/calc.svg)](https://www.npmjs.com/package/@smogon/calc)&nbsp;

Damage calculator for all generations of Pokémon battling.

If you are currently looking at [smogon/damage-calc][0] and not
a fork, this is the official repository for the Pokémon Showdown! damage calculator:
https://calc.pokemonshowdown.com.

This repository houses both the package implementing the core damage formula mechanics in each
generation ([`@smogon/calc`][1]) as well as [logic and markup for the official UI][2].

## `@smogon/calc`

The `@smogon/calc` package powers the UI, providing a programmatic interface for computing damage
ranges. This subpackage contains code that will run on both the server or browser and can be used
as a building block for alternative UIs or applications.

### Installation

```sh
$ npm install @smogon/calc
```

Alternatively, as [detailed below](#browser), if you are using `@smogon/calc` in the browser and want
a convenient way to get started, simply depend on a transpiled and minified version via [unpkg][5]:

```html
<script src="https://unpkg.com/@smogon/calc/dist/data/production.min.js"></script>
<script src="https://unpkg.com/@smogon/calc"></script>
{'fraction_non_alphanumeric': 0.11991199119911991, 'fraction_numerical': 0.004033736707004034, 'mean_word_length': 5.171945701357466, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6755193', 'n_tokens_mistral': 871, 'n_tokens_neox': 782, 'n_words': 296}