0.1.1 • Published 6 years ago

lucas-series v0.1.1

Weekly downloads
10
License
MIT
Repository
github
Last release
6 years ago

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