jalal246 / textics

πŸ“‰ JavaScript Text Statistics that counts lines, words, chars, and spaces.

Home Page:https://jalal246.github.io/textics/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

textics

text/ics counts lines, words, chars and spaces for a given string πŸ“ƒ πŸ“

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

Related projects

  • packageSorter - Sorting packages for monorepos production.

  • builderz - Building your project with zero config.

  • corename - Extracts package name.

  • get-info - Utility functions for projects production.

  • move-position - Moves element in given array form index-A to index-B

Tests

npm test

License

This project is licensed under the GPL-3.0 License

About

πŸ“‰ JavaScript Text Statistics that counts lines, words, chars, and spaces.

https://jalal246.github.io/textics/

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%