1.1.4 • Published 3 years ago

@affrae/fib-tools v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@affrae/fib-tools

Total alerts Language grade: JavaScript npm.io Mark stale issues and pull requests

This module provides helper functions for the Fibonacci sequence.

Get the nth Number

const {getNumber} = require('@affrae/fib-tools')
assert.strictEqual(getNumber(8), 21)

Get a List of Numbers

const {getList} = require('@affrae/fib-tools')
assert.strictDeepEqual(getList(8), [0, 1, 1, 2, 3, 5, 8, 13, 21])

Get a Sequence of Numbers

const {getSequence} = require('@affrae/fib-tools')

const seq = getSequence()

for (const n of seq) {
  console.log(n) // The next Fibonacci number in the sequence
}

Acknowledgements

This is openly and heavily borrowed from Jonathan Clem's fib-tools project, and he is listed as copyright owner in the MIT License. I used this to teach myself ~LGTM and QL~ GitHub Advanced Security, along with GitHub Actions

License

The scripts and documentation in this project are released under the MIT License

1.1.1

3 years ago

1.1.4

3 years ago

1.1.2

3 years ago

1.0.1608629034

4 years ago

1.0.1601612753

5 years ago

1.0.1601605708

5 years ago

1.0.1601601555

5 years ago

1.0.1601597549

5 years ago

1.0.1601598085

5 years ago

1.0.1586824942

5 years ago

1.0.1584663466

5 years ago

1.0.1584658338

5 years ago

1.0.1579048835

5 years ago

1.0.1573186588

6 years ago

1.0.1573183112

6 years ago

1.0.1572942532

6 years ago

1.0.1572942367

6 years ago

1.0.1572941865

6 years ago

1.0.1572940851

6 years ago

1.0.1572938430

6 years ago

1.0.1572937811

6 years ago

1.0.1572843286

6 years ago

1.0.1572226223

6 years ago

1.0.1572225845

6 years ago

1.0.1572154939

6 years ago

1.0.1572154698

6 years ago

1.0.1572154483

6 years ago

1.0.1572150550

6 years ago

1.0.1572149636

6 years ago

1.0.1572149538

6 years ago

1.0.1572149254

6 years ago

1.0.1572149199

6 years ago

1.0.1572149176

6 years ago

1.0.1572149010

6 years ago

1.0.1572148887

6 years ago

1.0.1572145438

6 years ago

1.0.1572145036

6 years ago

1.0.1572144749

6 years ago

1.0.1572144664

6 years ago

1.0.1572144472

6 years ago

0.0.1

6 years ago