Fibonacci
Fibonacci numbers and sequences.
Compute the Fibonacci Succession and NTH Fibonacci Number.
Install
npm install @ultirequiem/fibonacci
Usage
ESM only, types included: the same import works in Node.js, Bun and browsers.
import {
fibonacci,
fibonacciSequence,
} from "@ultirequiem/fibonacci";
fibonacci(10); //=> 55
fibonacci(5); //=> 5
// First 10 Fibonacci Numbers
for (const fiboNumber of fibonacciSequence(9)) {
console.log(fiboNumber);
}
console.log(`My favorites numbers are ${[...fibonacciSequence(3)]}.`);
//=> "My favorites numbers are 0,1,1,2."
Usage Example
- Fibonacci App: Preact + Tailwind Web App
Support
Open an Issue, I will check it as soon as possible π
If you want to hurry me up a bit send me a tweet π
Donβt forget to star the repo β
Authors
Eliaz Bobadilla - Creator and Maintainer πͺ
See also the full list of contributors who participated in this project β¨
Versioning
We use Semantic Versioning. For the versions available, see the tags π·οΈ
Licence
Licensed under the MIT License π