Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/transitive-bullshit/is-acronym

Determines whether a given string is a common English acronym.
https://github.com/transitive-bullshit/is-acronym

acronym acronyms english

Last synced: 2 months ago
JSON representation

Determines whether a given string is a common English acronym.

Awesome Lists containing this project

README

        

# is-acronym

> Determines whether a given string is a common English acronym.

[![NPM](https://img.shields.io/npm/v/is-acronym.svg)](https://www.npmjs.com/package/is-acronym) [![Build Status](https://travis-ci.com/transitive-bullshit/is-acronym.svg?branch=master)](https://travis-ci.com/transitive-bullshit/is-acronym) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

This module requires `node >= 4`.

```bash
npm install --save is-acronym
```

## Usage

```js
const isAcronym = require('is-acronym')

isAcronym('CDN') // true
isAcronym('FPS') // true

isAcronym('cdn') // false
isAcronym('fps') // false
isAcronym(' TEST ') // false
```

## API

### [isAcronym](https://github.com/transitive-bullshit/is-acronym/blob/aa7a523fe4ca884e81ae12dddd868e609484b341/index.js#L14-L19)

Determines whether a given string is a common English acronym.

Type: `function (text): boolean`

- `text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** String to test.

## Related

- [retext-redundant-acronyms](https://github.com/retextjs/retext-redundant-acronyms) - Check for redundant acronyms (ATM machine).

## License

MIT © [Travis Fischer](https://github.com/transitive-bullshit)