{"pageProps":{"code":{"benign.ts":{"name":"benign.ts","content":"function dateNow() {\n  return new Date().toISOString();\n}\n\nconsole.log(dateNow());\n","path":"code/1531/24T1/5.4/benign.ts","fileext":"ts"},"benign2.ts":{"name":"benign2.ts","content":"\nfunction loop(count: number, callback: (num: number) => void) {\n  for (let i = 0; i < count; i++) {\n    callback(i);\n  }\n}\n\nloop(5, console.log);\nloop(7, console.log);\n","path":"code/1531/24T1/5.4/benign2.ts","fileext":"ts"},"dry_dirty.ts":{"name":"dry_dirty.ts","content":"import { argv } from 'process';\n\nif (argv.length !== 3) {\n  process.exit(1);\n}\n\nconst num = parseInt(argv[2], 10);\n\nif (num === 2) {\n  for (let i = 10; i < 20; i++) {\n    const result = Math.pow(i, 2);\n    console.log(`${i} ** 2 = ${result}`);\n  }\n} else if (num === 3) {\n  for (let i = 10; i < 20; i++) {\n    const result = i ** 3;\n    console.log(`${i} ** 3 = ${result}`);\n  }\n} else {\n  process.exit(1);\n}\n","path":"code/1531/24T1/5.4/dry_dirty.ts","fileext":"ts"},"jest.config.js":{"name":"jest.config.js","content":"module.exports = {\n  preset: 'ts-jest',\n  testEnvironment: 'node',\n  maxWorkers: 1,\n};\n","path":"code/1531/24T1/5.4/jest.config.js","fileext":"js"},"package.json":{"name":"package.json","content":"{\n  \"name\": \"env2\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"jest src\",\n    \"tsc\": \"tsc --noImplicitAny\",\n    \"lint\": \"eslint src/**.ts\",\n    \"lint-fix\": \"eslint --fix src/**.ts\",\n    \"ts-node\": \"ts-node\",\n    \"jest\": \"jest\",\n    \"nodemon\": \"nodemon\",\n    \"ts-node-coverage\": \"nyc --reporter=text --reporter=lcov ts-node\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"devDependencies\": {\n    \"@types/express\": \"^4.17.13\",\n    \"@types/http-errors\": \"^1.8.2\",\n    \"@types/jest\": \"^27.5.0\",\n    \"@types/node\": \"^17.0.27\",\n    \"@types/prompt-sync\": \"^4.1.1\",\n    \"@typescript-eslint/eslint-plugin\": \"^5.21.0\",\n    \"@typescript-eslint/parser\": \"^5.21.0\",\n    \"eslint\": \"^8.14.0\",\n    \"eslint-plugin-jest\": \"^26.1.5\",\n    \"jest\": \"^28.1.0\",\n    \"middleware-http-errors\": \"^0.1.0\",\n    \"nodemon\": \"^2.0.16\",\n    \"nyc\": \"^15.1.0\",\n    \"ts-jest\": \"^28.0.2\",\n    \"typescript\": \"^4.6.3\"\n  },\n  \"dependencies\": {\n    \"express\": \"^4.18.0\",\n    \"http-errors\": \"^2.0.0\",\n    \"sync-request\": \"^6.1.0\",\n    \"ts-node\": \"^10.7.0\"\n  }\n}\n","path":"code/1531/24T1/5.4/package.json","fileext":"json"},"tsconfig.json":{"name":"tsconfig.json","content":"{\n    \"compilerOptions\": {\n        \"esModuleInterop\": true,\n        \"noImplicitAny\": false,\n        \"noEmit\": true,\n        \"resolveJsonModule\": true\n    },\n    \"exclude\": [\n      \"**/**_broken.ts\"\n    ]\n}\n\n","path":"code/1531/24T1/5.4/tsconfig.json","fileext":"json"}}},"__N_SSG":true}