| Total Complexity | 2 |
| Complexity/F | 2 |
| Lines of Code | 22 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import osPaths from '../src'; |
||
| 2 | |||
| 3 | /* eslint-disable security-node/detect-crlf */ |
||
| 4 | |||
| 5 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
||
| 6 | function objectEntries(obj: any) { |
||
| 7 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
||
| 8 | const map: any = {}; |
||
| 9 | Object.keys(obj).forEach((key) => { |
||
| 10 | // eslint-disable-next-line security/detect-object-injection |
||
| 11 | const value = obj[key]; |
||
| 12 | const val = typeof value === 'function' ? value() : value; |
||
| 13 | // eslint-disable-next-line functional/immutable-data , security/detect-object-injection |
||
| 14 | map[key] = val; |
||
| 15 | }); |
||
| 16 | return map; |
||
| 17 | } |
||
| 18 | |||
| 19 | console.log({ osPaths }); |
||
| 20 | console.log(objectEntries(osPaths)); |
||
| 21 | |||
| 22 | // eslint-disable-next-line functional/immutable-data |
||
| 23 | process.env.TMPDIR = process.env.TEMP = process.env.TMP = 'temp'; |
||
| 27 |