@octodemov2/fibonacci-generator

1.0.0 • Public • Published
Linux Windows MacOS

fib-tools

Get the nth Number

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

Get a List of Numbers

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

Get a Sequence of Numbers

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

const seq = getSequence()

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.00

Package Sidebar

Install

npm i @octodemov2/fibonacci-generator

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

6.74 kB

Total Files

6

Last publish

Collaborators

  • shikha_actions_test
  • pedrolacerda
  • bryancross