Skip to content

Compute optimized utility to generate Fibonacci sequence(s)

License

Notifications You must be signed in to change notification settings

tanichols-zz/fibonacci-singleton

Repository files navigation

Fibonacci-Singleton

Compute optimized utility to generate Fibonacci sequence(s). The library is implemented as a singleton and will not compute values that have already been computed.

Usage

  1. Import the utility into your codebase
import Fibonacci from 'fibonacci-singleton'
const Fibonacci = require('fibonacci-singleton')
  1. Generate Sequences
Fibonacci.getSequence(7)
[0, 1, 1, 2, 3, 5, 8]

Fibonacci.getSequence(2)
[0, 1]

Releases

No releases published

Packages

No packages published