Skip to content

jwerle/lucas-series

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lucas-series

Install

$ npm install lucas-series

Usage

const lucas = require('lucas-series')
const series = [...lucas(0, 5)] // 2 1 3 4 7

for (const n of lucas(5, 10)) { console.log(n) }
// prints:
// 11
// 18
// 29
// 47
// 76

API

lucas(seed = 0, max = Infinity)

Returns an object conforming to the Iteration Protocol interface that will yield a Lucas Number. This iterable lucas series can be initialized with a seed n value and a max interval value in the series defaulting to 0 and Infinity respectively.

License

MIT

About

Lucas number series generator

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published