textics

text/ics counts lines, words, chars and spaces for a given string :page_with_curl: :memo:

npm install textics

API

const { lines, words, chars, spaces } = textics(str);

Example

const { textics } = require("textics");

const result = textics("you got the power");

expect(result).to.deep.equal({
  lines: 1,
  words: 4,
  chars: 14,
  spaces: 3
});

Using textics with stream

Tests

npm test

License

This project is licensed under the GPL-3.0 License