Skip to content

dustinspecker/count-spaces

Repository files navigation

count-spaces

NPM version Build Status Coverage Status

Code Climate Dependencies DevDependencies

Count number of spaces

Install

npm install --save count-spaces

Usage

ES2015 (ES6)

import {end, start, total} from 'count-spaces';

end('some spaces  ');
// => 2

start('  start');
// => 2

total('  line of spaces ');
// => 5

ES5

var countSpaces = require('count-spaces');

countSpaces.end('some spaces  ');
// => 2

countSpaces.start('  start');
// => 2

countSpaces.total('  line of spaces ');
// => 5

LICENSE

MIT