ellipsis-format

0.0.2 • Public • Published

Ellipsis-Format

Build Status Coverage Status

Have you seen master of none? You know the title sequence where it has the names with all of those ... in it? I thought it would be cool if there was an npm package that looked like that. (I am sure it already exists but I couldn't find it.)

Installation

npm i ellipsis-format --save

Useage


const ellipsisFormat = require('ellipsis-format');
ellipsisFormat(params);

Param values

  • input - [[String], [String]] - 2D array with the following format [[String, String]]
  • min - Number - Minimum number of '.'s between the two strings

Example output


const ellipsisFormat = require('ellipsis-format');
const output = ellipsisFormat({
  min: 30,
  input: [
    ['Hello','Man'],
    ['Photographer','Danwakeem'],
    ['Softare','NPM Pack'],
    ['Errors','10'],
  ]
});

/*
  output

  Hello......................Man
  Photographer.........Danwakeem
  Softare...............NPM Pack
  Errors......................10

 */

Readme

Keywords

Package Sidebar

Install

npm i ellipsis-format

Weekly Downloads

1

Version

0.0.2

License

ISC

Unpacked Size

45.1 kB

Total Files

9

Last publish

Collaborators

  • danwakeem