Count number of spaces
npm install --save count-spaces
import {end, start, total} from 'count-spaces';
end('some spaces ');
// => 2
start(' start');
// => 2
total(' line of spaces ');
// => 5
var countSpaces = require('count-spaces');
countSpaces.end('some spaces ');
// => 2
countSpaces.start(' start');
// => 2
countSpaces.total(' line of spaces ');
// => 5
MIT