@octojessi/5-min-demo-rhoticity

6.0.8 • Public • Published
Linux Windows MacOS

fib-tools

Get the nth Number

const {getNumber} = require('@bbq-beets/fib-tools')
assert.strictEqual(getNumber(8), 21)

Get a List of Numbers

const {getList} = require('@bbq-beets/fib-tools')
assert.strictDeepEqual(getList(8), [0, 1, 1, 2, 3, 5, 8, 13, 21])

Get a Sequence of Numbers

const {getSequence} = require('@bbq-beets/fib-tools')

const seq = getSequence()

for (const n of seq) {
  console.log(n) // The next Fibonacci number in the sequence
}

Code Scanning Demo

This repository demonstrates an instance of CWE-020: Improper Imput Validation.

  1. Run through the setup flow in the security tab to enable code scanning. Commit directly to master.
  2. Go to actions, and confirm that the analysis has run successfully.
  3. Edit script.js and add this code snippet. Create a PR. Wait for validation.
function endsWith(x, y) {
  return x.lastIndexOf(y) === x.length - y.length;
}

Readme

Keywords

none

Package Sidebar

Install

npm i @octojessi/5-min-demo-rhoticity

Weekly Downloads

0

Version

6.0.8

License

MIT

Unpacked Size

11.5 kB

Total Files

10

Last publish

Collaborators

  • rhoticity