Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dustinspecker/count-spaces
Count number of spaces
https://github.com/dustinspecker/count-spaces
Last synced: 2 days 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 (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-31T21:39:28.000Z (over 7 years ago)
- Last Synced: 2023-08-27T14:53:43.123Z (about 1 year ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# count-spaces
[![NPM version](https://badge.fury.io/js/count-spaces.svg)](https://badge.fury.io/js/count-spaces) [![Build Status](https://travis-ci.org/dustinspecker/count-spaces.svg)](https://travis-ci.org/dustinspecker/count-spaces) [![Coverage Status](https://img.shields.io/coveralls/dustinspecker/count-spaces.svg)](https://coveralls.io/r/dustinspecker/count-spaces?branch=master)[![Code Climate](https://codeclimate.com/github/dustinspecker/count-spaces/badges/gpa.svg)](https://codeclimate.com/github/dustinspecker/count-spaces) [![Dependencies](https://david-dm.org/dustinspecker/count-spaces.svg)](https://david-dm.org/dustinspecker/count-spaces/#info=dependencies&view=table) [![DevDependencies](https://david-dm.org/dustinspecker/count-spaces/dev-status.svg)](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