https://github.com/dustinspecker/count-spaces
Count number of spaces
https://github.com/dustinspecker/count-spaces
Last synced: 3 months ago
JSON representation
Count number of spaces
- Host: GitHub
- URL: https://github.com/dustinspecker/count-spaces
- Owner: dustinspecker
- License: mit
- Created: 2015-07-08T01:11:36.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-31T21:39:28.000Z (about 8 years ago)
- Last Synced: 2025-03-17T16:17:12.179Z (4 months ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# count-spaces
[](https://badge.fury.io/js/count-spaces) [](https://travis-ci.org/dustinspecker/count-spaces) [](https://coveralls.io/r/dustinspecker/count-spaces?branch=master)[](https://codeclimate.com/github/dustinspecker/count-spaces) [](https://david-dm.org/dustinspecker/count-spaces/#info=dependencies&view=table) [](https://david-dm.org/dustinspecker/count-spaces/#info=devDependencies&view=table)
> Count number of spaces
## Install
```
npm install --save count-spaces
```## Usage
### ES2015 (ES6)
```javascript
import {end, start, total} from 'count-spaces';end('some spaces ');
// => 2start(' start');
// => 2total(' line of spaces ');
// => 5
```### ES5
```javascript
var countSpaces = require('count-spaces');countSpaces.end('some spaces ');
// => 2countSpaces.start(' start');
// => 2countSpaces.total(' line of spaces ');
// => 5
```## LICENSE
MIT