1.2.4 • Published 3 years ago

number-sequences v1.2.4

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
3 years ago

Number Sequences

JS library to generate a variety of immutable number sequences.

mikeyhogarth Codacy Badge npm

Installation

npm install number-sequences

Example

All number sequences return an immutable sequence object - the API for this is as per the ImmutableJS Seq type.

import { Arithmetic } from "number-sequences";

const seq = Arithmetic(1, 1);
seq.take(3).toArray(); // [1, 2, 3]

Available sequences

The following types of sequence are available with the following parameters being permitted for each.

  • Arithmetic(start, commonDifference)
  • Collatz(start)
  • Fibonacci()
  • Geometric(start, commonRatio)
  • Power(start)
  • Prime()
  • Triangle()
  • Twin(a, b)
  • NthPower(n)

Contributing

Build

npm build

Tests

npm test
npm run test:watch
1.2.4

3 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago