Skip to content

hkjels/is-fibonacci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-fibonacci

Check if a number is in the Fibonacci sequence

Gotchas

Only the first twenty Fibonacci numbers are used. Feel free to replace the algorithm as long as it is fast and synchronous.

Installation

Install with component(1):

$ component install hkjels/is-fibonacci

API

var isFibonacci = require('is-fibonacci');

if (isFibonacci(5)) {
  console.log('Five is a fibonacci number');
}

License

MIT

About

Check if a number is in the Fibonacci sequence

Resources

Stars

Watchers

Forks

Packages

No packages published