Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/k4m4/lexis-count
Retrieve the number of words in a string.
https://github.com/k4m4/lexis-count
api count counter lexis nodejs words
Last synced: about 2 months ago
JSON representation
Retrieve the number of words in a string.
- Host: GitHub
- URL: https://github.com/k4m4/lexis-count
- Owner: k4m4
- License: mit
- Created: 2018-03-06T17:23:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T16:13:42.000Z (almost 2 years ago)
- Last Synced: 2024-10-05T10:35:38.372Z (3 months ago)
- Topics: api, count, counter, lexis, nodejs, words
- Language: JavaScript
- Size: 481 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
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')
//=> 5lexisCount(' 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)