count-spaces
v1.1.0
Published
Count number of spaces
Downloads
15
Readme
count-spaces
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