├── index.js ├── index.ts ├── package-lock.json ├── package.json └── tsconfig.json /index.js: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env node 2 | import inquirer from "inquirer"; 3 | import chalk from "chalk"; 4 | const currencyRates = { 5 | USD: 1, 6 | PKR: 280, 7 | EUR: 0.89, 8 | GBP: 0.75, 9 | INR: 73.5, 10 | AUD: 1.31, 11 | CAD: 1.26, 12 | CHF: 0.91, 13 | CNY: 6.87, 14 | JPY: 110.5, 15 | // Add more currency rates here 16 | }; 17 | const answers = await inquirer.prompt([ 18 | { 19 | message: chalk.blue("Write The Currency Name Do You Have"), 20 | name: "fromCurrency", 21 | type: "list", 22 | choices: ['USD', 'PKR', 'EUR', 'GBP', 'INR', 'AUD', 'CAD', 'CHF', 'CNY', 'JPY'] 23 | }, 24 | { 25 | message: chalk.blue("What The Currency do You Want To Convert"), 26 | name: "toCurrency", 27 | type: "list", 28 | choices: ['USD', 'PKR', 'EUR', 'GBP', 'INR', 'AUD', 'CAD', 'CHF', 'CNY', 'JPY'] 29 | }, 30 | { 31 | message: chalk.blue("Enter Your Amount To Be Convert"), 32 | name: "amount", 33 | type: "number" 34 | } 35 | ]); 36 | const fromAmount = currencyRates[answers.fromCurrency]; 37 | const toAmount = currencyRates[answers.toCurrency]; 38 | const amount = answers.amount; 39 | const baseAmount = amount / fromAmount; 40 | const convertAmount = baseAmount * toAmount; 41 | console.log(chalk.green(`${amount} ${answers.fromCurrency} = ${convertAmount.toFixed(2)} ${answers.toCurrency}`)); 42 | -------------------------------------------------------------------------------- /index.ts: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env node 2 | import inquirer from "inquirer"; 3 | import chalk from "chalk"; 4 | const currencyRates: any = { 5 | USD: 1, 6 | PKR: 280, 7 | EUR: 0.89, 8 | GBP: 0.75, 9 | INR: 73.5, 10 | AUD: 1.31, 11 | CAD: 1.26, 12 | CHF: 0.91, 13 | CNY: 6.87, 14 | JPY: 110.5, 15 | // Add more currency rates here 16 | }; 17 | 18 | const answers = await inquirer.prompt([ 19 | { 20 | message: chalk.blue("Write The Currency Name Do You Have"), 21 | name: "fromCurrency", 22 | type: "list", 23 | choices: ['USD', 'PKR', 'EUR', 'GBP', 'INR', 'AUD', 'CAD', 'CHF', 'CNY', 'JPY'] 24 | }, 25 | { 26 | message: chalk.blue("What The Currency do You Want To Convert"), 27 | name: "toCurrency", 28 | type: "list", 29 | choices: ['USD', 'PKR', 'EUR', 'GBP', 'INR', 'AUD', 'CAD', 'CHF', 'CNY', 'JPY'] 30 | }, 31 | { 32 | message: chalk.blue("Enter Your Amount To Be Convert"), 33 | name: "amount", 34 | type: "number" 35 | } 36 | ]); 37 | 38 | const fromAmount = currencyRates[answers.fromCurrency]; 39 | const toAmount = currencyRates[answers.toCurrency]; 40 | const amount = answers.amount; 41 | const baseAmount = amount / fromAmount; 42 | const convertAmount = baseAmount * toAmount; 43 | console.log(chalk.green(`${amount} ${answers.fromCurrency} = ${convertAmount.toFixed(2)} ${answers.toCurrency}`)); -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "upo1-currency-converter", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "upo1-currency-converter", 9 | "version": "1.0.0", 10 | "license": "MIT", 11 | "bin": { 12 | "upo1-currency-converter": "index.js" 13 | }, 14 | "devDependencies": { 15 | "@types/inquirer": "^9.0.7", 16 | "chalk": "^5.3.0", 17 | "inquirer": "^9.2.17" 18 | } 19 | }, 20 | "node_modules/@ljharb/through": { 21 | "version": "2.3.13", 22 | "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.13.tgz", 23 | "integrity": "sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==", 24 | "dev": true, 25 | "dependencies": { 26 | "call-bind": "^1.0.7" 27 | }, 28 | "engines": { 29 | "node": ">= 0.4" 30 | } 31 | }, 32 | "node_modules/@types/inquirer": { 33 | "version": "9.0.7", 34 | "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-9.0.7.tgz", 35 | "integrity": "sha512-Q0zyBupO6NxGRZut/JdmqYKOnN95Eg5V8Csg3PGKkP+FnvsUZx1jAyK7fztIszxxMuoBA6E3KXWvdZVXIpx60g==", 36 | "dev": true, 37 | "dependencies": { 38 | "@types/through": "*", 39 | "rxjs": "^7.2.0" 40 | } 41 | }, 42 | "node_modules/@types/node": { 43 | "version": "20.12.4", 44 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.4.tgz", 45 | "integrity": "sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==", 46 | "dev": true, 47 | "dependencies": { 48 | "undici-types": "~5.26.4" 49 | } 50 | }, 51 | "node_modules/@types/through": { 52 | "version": "0.0.33", 53 | "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.33.tgz", 54 | "integrity": "sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==", 55 | "dev": true, 56 | "dependencies": { 57 | "@types/node": "*" 58 | } 59 | }, 60 | "node_modules/ansi-escapes": { 61 | "version": "4.3.2", 62 | "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", 63 | "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", 64 | "dev": true, 65 | "dependencies": { 66 | "type-fest": "^0.21.3" 67 | }, 68 | "engines": { 69 | "node": ">=8" 70 | }, 71 | "funding": { 72 | "url": "https://github.com/sponsors/sindresorhus" 73 | } 74 | }, 75 | "node_modules/ansi-regex": { 76 | "version": "5.0.1", 77 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 78 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 79 | "dev": true, 80 | "engines": { 81 | "node": ">=8" 82 | } 83 | }, 84 | "node_modules/ansi-styles": { 85 | "version": "4.3.0", 86 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 87 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 88 | "dev": true, 89 | "dependencies": { 90 | "color-convert": "^2.0.1" 91 | }, 92 | "engines": { 93 | "node": ">=8" 94 | }, 95 | "funding": { 96 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 97 | } 98 | }, 99 | "node_modules/base64-js": { 100 | "version": "1.5.1", 101 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 102 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 103 | "dev": true, 104 | "funding": [ 105 | { 106 | "type": "github", 107 | "url": "https://github.com/sponsors/feross" 108 | }, 109 | { 110 | "type": "patreon", 111 | "url": "https://www.patreon.com/feross" 112 | }, 113 | { 114 | "type": "consulting", 115 | "url": "https://feross.org/support" 116 | } 117 | ] 118 | }, 119 | "node_modules/bl": { 120 | "version": "4.1.0", 121 | "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", 122 | "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", 123 | "dev": true, 124 | "dependencies": { 125 | "buffer": "^5.5.0", 126 | "inherits": "^2.0.4", 127 | "readable-stream": "^3.4.0" 128 | } 129 | }, 130 | "node_modules/buffer": { 131 | "version": "5.7.1", 132 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 133 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 134 | "dev": true, 135 | "funding": [ 136 | { 137 | "type": "github", 138 | "url": "https://github.com/sponsors/feross" 139 | }, 140 | { 141 | "type": "patreon", 142 | "url": "https://www.patreon.com/feross" 143 | }, 144 | { 145 | "type": "consulting", 146 | "url": "https://feross.org/support" 147 | } 148 | ], 149 | "dependencies": { 150 | "base64-js": "^1.3.1", 151 | "ieee754": "^1.1.13" 152 | } 153 | }, 154 | "node_modules/call-bind": { 155 | "version": "1.0.7", 156 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", 157 | "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", 158 | "dev": true, 159 | "dependencies": { 160 | "es-define-property": "^1.0.0", 161 | "es-errors": "^1.3.0", 162 | "function-bind": "^1.1.2", 163 | "get-intrinsic": "^1.2.4", 164 | "set-function-length": "^1.2.1" 165 | }, 166 | "engines": { 167 | "node": ">= 0.4" 168 | }, 169 | "funding": { 170 | "url": "https://github.com/sponsors/ljharb" 171 | } 172 | }, 173 | "node_modules/chalk": { 174 | "version": "5.3.0", 175 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", 176 | "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", 177 | "dev": true, 178 | "engines": { 179 | "node": "^12.17.0 || ^14.13 || >=16.0.0" 180 | }, 181 | "funding": { 182 | "url": "https://github.com/chalk/chalk?sponsor=1" 183 | } 184 | }, 185 | "node_modules/chardet": { 186 | "version": "0.7.0", 187 | "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", 188 | "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", 189 | "dev": true 190 | }, 191 | "node_modules/cli-cursor": { 192 | "version": "3.1.0", 193 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", 194 | "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", 195 | "dev": true, 196 | "dependencies": { 197 | "restore-cursor": "^3.1.0" 198 | }, 199 | "engines": { 200 | "node": ">=8" 201 | } 202 | }, 203 | "node_modules/cli-spinners": { 204 | "version": "2.9.2", 205 | "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", 206 | "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", 207 | "dev": true, 208 | "engines": { 209 | "node": ">=6" 210 | }, 211 | "funding": { 212 | "url": "https://github.com/sponsors/sindresorhus" 213 | } 214 | }, 215 | "node_modules/cli-width": { 216 | "version": "4.1.0", 217 | "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", 218 | "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", 219 | "dev": true, 220 | "engines": { 221 | "node": ">= 12" 222 | } 223 | }, 224 | "node_modules/clone": { 225 | "version": "1.0.4", 226 | "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", 227 | "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", 228 | "dev": true, 229 | "engines": { 230 | "node": ">=0.8" 231 | } 232 | }, 233 | "node_modules/color-convert": { 234 | "version": "2.0.1", 235 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 236 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 237 | "dev": true, 238 | "dependencies": { 239 | "color-name": "~1.1.4" 240 | }, 241 | "engines": { 242 | "node": ">=7.0.0" 243 | } 244 | }, 245 | "node_modules/color-name": { 246 | "version": "1.1.4", 247 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 248 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 249 | "dev": true 250 | }, 251 | "node_modules/defaults": { 252 | "version": "1.0.4", 253 | "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", 254 | "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", 255 | "dev": true, 256 | "dependencies": { 257 | "clone": "^1.0.2" 258 | }, 259 | "funding": { 260 | "url": "https://github.com/sponsors/sindresorhus" 261 | } 262 | }, 263 | "node_modules/define-data-property": { 264 | "version": "1.1.4", 265 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", 266 | "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", 267 | "dev": true, 268 | "dependencies": { 269 | "es-define-property": "^1.0.0", 270 | "es-errors": "^1.3.0", 271 | "gopd": "^1.0.1" 272 | }, 273 | "engines": { 274 | "node": ">= 0.4" 275 | }, 276 | "funding": { 277 | "url": "https://github.com/sponsors/ljharb" 278 | } 279 | }, 280 | "node_modules/emoji-regex": { 281 | "version": "8.0.0", 282 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 283 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 284 | "dev": true 285 | }, 286 | "node_modules/es-define-property": { 287 | "version": "1.0.0", 288 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", 289 | "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", 290 | "dev": true, 291 | "dependencies": { 292 | "get-intrinsic": "^1.2.4" 293 | }, 294 | "engines": { 295 | "node": ">= 0.4" 296 | } 297 | }, 298 | "node_modules/es-errors": { 299 | "version": "1.3.0", 300 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 301 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 302 | "dev": true, 303 | "engines": { 304 | "node": ">= 0.4" 305 | } 306 | }, 307 | "node_modules/escape-string-regexp": { 308 | "version": "1.0.5", 309 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 310 | "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", 311 | "dev": true, 312 | "engines": { 313 | "node": ">=0.8.0" 314 | } 315 | }, 316 | "node_modules/external-editor": { 317 | "version": "3.1.0", 318 | "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", 319 | "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", 320 | "dev": true, 321 | "dependencies": { 322 | "chardet": "^0.7.0", 323 | "iconv-lite": "^0.4.24", 324 | "tmp": "^0.0.33" 325 | }, 326 | "engines": { 327 | "node": ">=4" 328 | } 329 | }, 330 | "node_modules/figures": { 331 | "version": "3.2.0", 332 | "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", 333 | "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", 334 | "dev": true, 335 | "dependencies": { 336 | "escape-string-regexp": "^1.0.5" 337 | }, 338 | "engines": { 339 | "node": ">=8" 340 | }, 341 | "funding": { 342 | "url": "https://github.com/sponsors/sindresorhus" 343 | } 344 | }, 345 | "node_modules/function-bind": { 346 | "version": "1.1.2", 347 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 348 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 349 | "dev": true, 350 | "funding": { 351 | "url": "https://github.com/sponsors/ljharb" 352 | } 353 | }, 354 | "node_modules/get-intrinsic": { 355 | "version": "1.2.4", 356 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", 357 | "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", 358 | "dev": true, 359 | "dependencies": { 360 | "es-errors": "^1.3.0", 361 | "function-bind": "^1.1.2", 362 | "has-proto": "^1.0.1", 363 | "has-symbols": "^1.0.3", 364 | "hasown": "^2.0.0" 365 | }, 366 | "engines": { 367 | "node": ">= 0.4" 368 | }, 369 | "funding": { 370 | "url": "https://github.com/sponsors/ljharb" 371 | } 372 | }, 373 | "node_modules/gopd": { 374 | "version": "1.0.1", 375 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 376 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 377 | "dev": true, 378 | "dependencies": { 379 | "get-intrinsic": "^1.1.3" 380 | }, 381 | "funding": { 382 | "url": "https://github.com/sponsors/ljharb" 383 | } 384 | }, 385 | "node_modules/has-flag": { 386 | "version": "4.0.0", 387 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 388 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 389 | "dev": true, 390 | "engines": { 391 | "node": ">=8" 392 | } 393 | }, 394 | "node_modules/has-property-descriptors": { 395 | "version": "1.0.2", 396 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", 397 | "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", 398 | "dev": true, 399 | "dependencies": { 400 | "es-define-property": "^1.0.0" 401 | }, 402 | "funding": { 403 | "url": "https://github.com/sponsors/ljharb" 404 | } 405 | }, 406 | "node_modules/has-proto": { 407 | "version": "1.0.3", 408 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", 409 | "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", 410 | "dev": true, 411 | "engines": { 412 | "node": ">= 0.4" 413 | }, 414 | "funding": { 415 | "url": "https://github.com/sponsors/ljharb" 416 | } 417 | }, 418 | "node_modules/has-symbols": { 419 | "version": "1.0.3", 420 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 421 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 422 | "dev": true, 423 | "engines": { 424 | "node": ">= 0.4" 425 | }, 426 | "funding": { 427 | "url": "https://github.com/sponsors/ljharb" 428 | } 429 | }, 430 | "node_modules/hasown": { 431 | "version": "2.0.2", 432 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 433 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 434 | "dev": true, 435 | "dependencies": { 436 | "function-bind": "^1.1.2" 437 | }, 438 | "engines": { 439 | "node": ">= 0.4" 440 | } 441 | }, 442 | "node_modules/iconv-lite": { 443 | "version": "0.4.24", 444 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 445 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 446 | "dev": true, 447 | "dependencies": { 448 | "safer-buffer": ">= 2.1.2 < 3" 449 | }, 450 | "engines": { 451 | "node": ">=0.10.0" 452 | } 453 | }, 454 | "node_modules/ieee754": { 455 | "version": "1.2.1", 456 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 457 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 458 | "dev": true, 459 | "funding": [ 460 | { 461 | "type": "github", 462 | "url": "https://github.com/sponsors/feross" 463 | }, 464 | { 465 | "type": "patreon", 466 | "url": "https://www.patreon.com/feross" 467 | }, 468 | { 469 | "type": "consulting", 470 | "url": "https://feross.org/support" 471 | } 472 | ] 473 | }, 474 | "node_modules/inherits": { 475 | "version": "2.0.4", 476 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 477 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 478 | "dev": true 479 | }, 480 | "node_modules/inquirer": { 481 | "version": "9.2.17", 482 | "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.17.tgz", 483 | "integrity": "sha512-Vr3Ia2ud5sGnioURkE69endl4SkeJcMzTF6SosKcX5GALJfId7C+JvO5ZZb6y1LOXnEofCPbwzoQ1q0e8Gaduw==", 484 | "dev": true, 485 | "dependencies": { 486 | "@ljharb/through": "^2.3.13", 487 | "ansi-escapes": "^4.3.2", 488 | "chalk": "^5.3.0", 489 | "cli-cursor": "^3.1.0", 490 | "cli-width": "^4.1.0", 491 | "external-editor": "^3.1.0", 492 | "figures": "^3.2.0", 493 | "lodash": "^4.17.21", 494 | "mute-stream": "1.0.0", 495 | "ora": "^5.4.1", 496 | "run-async": "^3.0.0", 497 | "rxjs": "^7.8.1", 498 | "string-width": "^4.2.3", 499 | "strip-ansi": "^6.0.1", 500 | "wrap-ansi": "^6.2.0" 501 | }, 502 | "engines": { 503 | "node": ">=18" 504 | } 505 | }, 506 | "node_modules/is-fullwidth-code-point": { 507 | "version": "3.0.0", 508 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 509 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 510 | "dev": true, 511 | "engines": { 512 | "node": ">=8" 513 | } 514 | }, 515 | "node_modules/is-interactive": { 516 | "version": "1.0.0", 517 | "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", 518 | "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", 519 | "dev": true, 520 | "engines": { 521 | "node": ">=8" 522 | } 523 | }, 524 | "node_modules/is-unicode-supported": { 525 | "version": "0.1.0", 526 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 527 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 528 | "dev": true, 529 | "engines": { 530 | "node": ">=10" 531 | }, 532 | "funding": { 533 | "url": "https://github.com/sponsors/sindresorhus" 534 | } 535 | }, 536 | "node_modules/lodash": { 537 | "version": "4.17.21", 538 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 539 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 540 | "dev": true 541 | }, 542 | "node_modules/log-symbols": { 543 | "version": "4.1.0", 544 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 545 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 546 | "dev": true, 547 | "dependencies": { 548 | "chalk": "^4.1.0", 549 | "is-unicode-supported": "^0.1.0" 550 | }, 551 | "engines": { 552 | "node": ">=10" 553 | }, 554 | "funding": { 555 | "url": "https://github.com/sponsors/sindresorhus" 556 | } 557 | }, 558 | "node_modules/log-symbols/node_modules/chalk": { 559 | "version": "4.1.2", 560 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 561 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 562 | "dev": true, 563 | "dependencies": { 564 | "ansi-styles": "^4.1.0", 565 | "supports-color": "^7.1.0" 566 | }, 567 | "engines": { 568 | "node": ">=10" 569 | }, 570 | "funding": { 571 | "url": "https://github.com/chalk/chalk?sponsor=1" 572 | } 573 | }, 574 | "node_modules/mimic-fn": { 575 | "version": "2.1.0", 576 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", 577 | "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", 578 | "dev": true, 579 | "engines": { 580 | "node": ">=6" 581 | } 582 | }, 583 | "node_modules/mute-stream": { 584 | "version": "1.0.0", 585 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", 586 | "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", 587 | "dev": true, 588 | "engines": { 589 | "node": "^14.17.0 || ^16.13.0 || >=18.0.0" 590 | } 591 | }, 592 | "node_modules/onetime": { 593 | "version": "5.1.2", 594 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", 595 | "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", 596 | "dev": true, 597 | "dependencies": { 598 | "mimic-fn": "^2.1.0" 599 | }, 600 | "engines": { 601 | "node": ">=6" 602 | }, 603 | "funding": { 604 | "url": "https://github.com/sponsors/sindresorhus" 605 | } 606 | }, 607 | "node_modules/ora": { 608 | "version": "5.4.1", 609 | "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", 610 | "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", 611 | "dev": true, 612 | "dependencies": { 613 | "bl": "^4.1.0", 614 | "chalk": "^4.1.0", 615 | "cli-cursor": "^3.1.0", 616 | "cli-spinners": "^2.5.0", 617 | "is-interactive": "^1.0.0", 618 | "is-unicode-supported": "^0.1.0", 619 | "log-symbols": "^4.1.0", 620 | "strip-ansi": "^6.0.0", 621 | "wcwidth": "^1.0.1" 622 | }, 623 | "engines": { 624 | "node": ">=10" 625 | }, 626 | "funding": { 627 | "url": "https://github.com/sponsors/sindresorhus" 628 | } 629 | }, 630 | "node_modules/ora/node_modules/chalk": { 631 | "version": "4.1.2", 632 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 633 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 634 | "dev": true, 635 | "dependencies": { 636 | "ansi-styles": "^4.1.0", 637 | "supports-color": "^7.1.0" 638 | }, 639 | "engines": { 640 | "node": ">=10" 641 | }, 642 | "funding": { 643 | "url": "https://github.com/chalk/chalk?sponsor=1" 644 | } 645 | }, 646 | "node_modules/os-tmpdir": { 647 | "version": "1.0.2", 648 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 649 | "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", 650 | "dev": true, 651 | "engines": { 652 | "node": ">=0.10.0" 653 | } 654 | }, 655 | "node_modules/readable-stream": { 656 | "version": "3.6.2", 657 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", 658 | "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", 659 | "dev": true, 660 | "dependencies": { 661 | "inherits": "^2.0.3", 662 | "string_decoder": "^1.1.1", 663 | "util-deprecate": "^1.0.1" 664 | }, 665 | "engines": { 666 | "node": ">= 6" 667 | } 668 | }, 669 | "node_modules/restore-cursor": { 670 | "version": "3.1.0", 671 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", 672 | "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", 673 | "dev": true, 674 | "dependencies": { 675 | "onetime": "^5.1.0", 676 | "signal-exit": "^3.0.2" 677 | }, 678 | "engines": { 679 | "node": ">=8" 680 | } 681 | }, 682 | "node_modules/run-async": { 683 | "version": "3.0.0", 684 | "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", 685 | "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", 686 | "dev": true, 687 | "engines": { 688 | "node": ">=0.12.0" 689 | } 690 | }, 691 | "node_modules/rxjs": { 692 | "version": "7.8.1", 693 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", 694 | "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", 695 | "dev": true, 696 | "dependencies": { 697 | "tslib": "^2.1.0" 698 | } 699 | }, 700 | "node_modules/safe-buffer": { 701 | "version": "5.2.1", 702 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 703 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 704 | "dev": true, 705 | "funding": [ 706 | { 707 | "type": "github", 708 | "url": "https://github.com/sponsors/feross" 709 | }, 710 | { 711 | "type": "patreon", 712 | "url": "https://www.patreon.com/feross" 713 | }, 714 | { 715 | "type": "consulting", 716 | "url": "https://feross.org/support" 717 | } 718 | ] 719 | }, 720 | "node_modules/safer-buffer": { 721 | "version": "2.1.2", 722 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 723 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 724 | "dev": true 725 | }, 726 | "node_modules/set-function-length": { 727 | "version": "1.2.2", 728 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", 729 | "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", 730 | "dev": true, 731 | "dependencies": { 732 | "define-data-property": "^1.1.4", 733 | "es-errors": "^1.3.0", 734 | "function-bind": "^1.1.2", 735 | "get-intrinsic": "^1.2.4", 736 | "gopd": "^1.0.1", 737 | "has-property-descriptors": "^1.0.2" 738 | }, 739 | "engines": { 740 | "node": ">= 0.4" 741 | } 742 | }, 743 | "node_modules/signal-exit": { 744 | "version": "3.0.7", 745 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", 746 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", 747 | "dev": true 748 | }, 749 | "node_modules/string_decoder": { 750 | "version": "1.3.0", 751 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 752 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 753 | "dev": true, 754 | "dependencies": { 755 | "safe-buffer": "~5.2.0" 756 | } 757 | }, 758 | "node_modules/string-width": { 759 | "version": "4.2.3", 760 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 761 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 762 | "dev": true, 763 | "dependencies": { 764 | "emoji-regex": "^8.0.0", 765 | "is-fullwidth-code-point": "^3.0.0", 766 | "strip-ansi": "^6.0.1" 767 | }, 768 | "engines": { 769 | "node": ">=8" 770 | } 771 | }, 772 | "node_modules/strip-ansi": { 773 | "version": "6.0.1", 774 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 775 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 776 | "dev": true, 777 | "dependencies": { 778 | "ansi-regex": "^5.0.1" 779 | }, 780 | "engines": { 781 | "node": ">=8" 782 | } 783 | }, 784 | "node_modules/supports-color": { 785 | "version": "7.2.0", 786 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 787 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 788 | "dev": true, 789 | "dependencies": { 790 | "has-flag": "^4.0.0" 791 | }, 792 | "engines": { 793 | "node": ">=8" 794 | } 795 | }, 796 | "node_modules/tmp": { 797 | "version": "0.0.33", 798 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", 799 | "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", 800 | "dev": true, 801 | "dependencies": { 802 | "os-tmpdir": "~1.0.2" 803 | }, 804 | "engines": { 805 | "node": ">=0.6.0" 806 | } 807 | }, 808 | "node_modules/tslib": { 809 | "version": "2.6.2", 810 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", 811 | "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", 812 | "dev": true 813 | }, 814 | "node_modules/type-fest": { 815 | "version": "0.21.3", 816 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", 817 | "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", 818 | "dev": true, 819 | "engines": { 820 | "node": ">=10" 821 | }, 822 | "funding": { 823 | "url": "https://github.com/sponsors/sindresorhus" 824 | } 825 | }, 826 | "node_modules/undici-types": { 827 | "version": "5.26.5", 828 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", 829 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", 830 | "dev": true 831 | }, 832 | "node_modules/util-deprecate": { 833 | "version": "1.0.2", 834 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 835 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", 836 | "dev": true 837 | }, 838 | "node_modules/wcwidth": { 839 | "version": "1.0.1", 840 | "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", 841 | "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", 842 | "dev": true, 843 | "dependencies": { 844 | "defaults": "^1.0.3" 845 | } 846 | }, 847 | "node_modules/wrap-ansi": { 848 | "version": "6.2.0", 849 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", 850 | "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", 851 | "dev": true, 852 | "dependencies": { 853 | "ansi-styles": "^4.0.0", 854 | "string-width": "^4.1.0", 855 | "strip-ansi": "^6.0.0" 856 | }, 857 | "engines": { 858 | "node": ">=8" 859 | } 860 | } 861 | } 862 | } 863 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "upo1-currency-converter", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "type": "module", 7 | "bin": { 8 | "upo1-currency-converter": "index.js" 9 | }, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Umar Farooq", 14 | "license": "MIT", 15 | "devDependencies": { 16 | "@types/inquirer": "^9.0.7", 17 | "chalk": "^5.3.0", 18 | "inquirer": "^9.2.17" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "NodeNext", /* Specify what module code is generated. */ 29 | // "rootDir": "./", /* Specify the root folder within your source files. */ 30 | "moduleResolution": "NodeNext", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 83 | 84 | /* Type Checking */ 85 | "strict": true, /* Enable all strict type-checking options. */ 86 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | --------------------------------------------------------------------------------