Make short a long string, concatenated with three dots
npm install shortfield| CI / CD | Status |
| ------- | ------ |
| NPM |  |
| Semaphore CI |  |
| Circle CI |  |
| Coverall |  |
| SonarCloud |  |
shortfield returns a string truncated after X characters (default 10), concatenated with "..." (three dots).
Useful in tables with long strings.
E.g. "This is a long string" will return "This is a ..."
npm install shortfield``js
import { Shortener } from "shortfield";
var shorted = Shortener("This is a long string"); // default length is 10
console.log(shorted); // returns This is a ...
var shorted = Shortener("This is a long string", 4);
console.log(shorted); // returns This...
``