{"version":3,"sources":["jsdelivr-header.js","/npm/fibonacci-cli@1.2.4/cli.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;ACLA,aAEA,MAAM,KAAO,2BASb,SAAS,QAAS,EAAO,EAAO,EAAG,EAAU,GAC5C,OAAI,GAAS,EACL,EAED,UAAU,EAAO,EAAS,EAAO,EACzC,CAXI,OAAO,QAAQ,KAAK,MACvB,QAAQ,IAAI,MACZ,QAAQ,KAAK,IAYd,QAAQ,IAAI,QAAQ,KAAK,GAAK,SAAS,QAAQ,KAAK,IAAM","file":"/npm/fibonacci-cli@1.2.4/cli.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/fibonacci-cli@1.2.4/cli.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#! /usr/bin/env node\n'use strict';\n\nconst help = \"Usage: fibonacci [index]\"\n\n// We need numbers\nif (isNaN(+process.argv[2])) {\n\tconsole.log(help);\n\tprocess.exit(1);\n}\n\n// Calculate a fibonacci number\nfunction fibCalc (total, prev = 1, current = 1) {\n\tif (total <= 1) {\n\t\treturn current;\n\t}\n\treturn fibCalc(--total, current, prev + current);\n}\n\n// Log the fibonacci number\nconsole.log(process.argv[2] ? fibCalc(+process.argv[2]) : help);\n"]}