# lexis-count

> Retrieve the number of words in a string.

Latest version **1.0.11** (published 2020-04-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install lexis-count
pnpm add lexis-count
yarn add lexis-count
bun add lexis-count
```

## 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 | 1.0.11 |
| Published | 2020-04-04 |
| First published | 2018-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 1 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Nikolaos Kamarinakis |
| Maintainers | k4m4 |
| Keywords | word, count |

## Links

- npm: https://www.npmjs.com/package/lexis-count
- Repository: https://github.com/k4m4/lexis-count
- Homepage: https://github.com/k4m4/lexis-count#readme
- Issues: https://github.com/k4m4/lexis-count/issues
- npm.io page: https://npm.io/package/lexis-count

## Dependencies (1)

- [condense-whitespace](https://npm.io/package/condense-whitespace.md) ^1.0.0

## Recent versions

- 1.0.11 (latest) — 2020-04-04
- 1.0.10 — 2020-04-04
- 1.0.9 — 2019-07-13
- 1.0.8 — 2019-07-13
- 1.0.7 — 2019-06-05
- 1.0.6 — 2019-02-10
- 1.0.5 — 2018-12-05
- 1.0.4 — 2018-10-12
- 1.0.3 — 2018-03-09
- 1.0.2 — 2018-03-06
- 1.0.1 — 2018-03-06
- 1.0.0 — 2018-03-06

## README

# lexis-count [![Build Status](https://travis-ci.org/k4m4/lexis-count.svg?branch=master)](https://travis-ci.org/k4m4/lexis-count)

> Retrieve the number of words in a string.


## Install

```
~ ❯❯❯ npm install lexis-count
```


## Usage

```js
const lexisCount = require('lexis-count');

lexisCount('Lorem ipsum dolor sit amet')
//=> 5

lexisCount(' Lorem ipsum dolor   sit amet  ')
//=> 5
```


## API

### lexisCount()

Type: `string`

Returns the number of words in a string.


## Related

- [lexis](https://github.com/k4m4/lexis) - CLI for this module


## Credits

- The regular expression used has been adapted from [word-regex](https://github.com/regexhq/word-regex) by [regexhq](https://github.com/regexhq).


## License

MIT © [Nikolaos Kamarinakis](https://nikolaskama.me)

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