Skip to content

eush77/gseq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm

gseq

Build Status Dependency Status

Print geometric sequence of numbers, from one number to the other.

Example

> gseq 1 2 50
1
2
4
8
16
32

CLI

> gseq [OPTION]... FIRST RATIO LAST

Prints FIRST, FIRST*RATIO, FIRST*RATIO*RATIO, … up to a number that exceeds LAST.

The sequence is descending if RATIO<1. All parameters must be positive.

Options:

  • -f, --format=FORMAT: use printf-style FORMAT for each number.
  • -s, --separator=STRING: use STRING to separate numbers (default: \n).
  • -w, --equal-width: equalize width by padding with zeroes.

Install

npm install -g gseq

License

MIT