[![npm](https://nodei.co/npm/@projectjam/morse-translate.png?downloads=true&downloadrank=true&stars=true)](https://nodei.co/npm/@projectjam/morse-translate/)

> [!note]
> we are using morsecode.world's list of morse code symbols. find more [here](https://morsecode.world/international/morse.html)

# @projectjam/morse-translate

a morse code translator that is blazing fast and efficient

## features

- blazing fast and efficient
- easy to use
- supports custom symbols
- supports abbreviations
- supports typescript, commonjs and esm

## installation

```bash
npm install @projectjam/morse-translate
```

## usage

### for typescript/esm

```typescript
import { translate } from '@projectjam/morse-translate';

console.log(translate('hello world')); // to encode
console.log(translate('.... . .-.. .-.. ---')); // to decode
```

### for javascript/cjs

```javascript
const { translate } = require('@projectjam/morse-translate');

console.log(translate('hello world')); // to encode
console.log(translate('.... . .-.. .-.. ---')); // to decode
```

## contributing

pull requests are welcome! for major changes, please open an issue first or [email us](mailto:contact@project-jam.is-a.dev). make sure tests are updated to cover new options.
