还是TMD键问题

This commit is contained in:
kangkang520
2018-11-13 00:12:20 +08:00
parent 6e8354128d
commit a73ec5a477
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ini-decode",
"version": "1.0.7",
"version": "1.0.8",
"description": "",
"main": "dist/index.js",
"types": "typing/index.d.ts",

View File

@ -74,8 +74,8 @@ function parseDetail(data: any, parent: any, key: any): string {
}
else {
return `{\n\t${Object.keys(data).map(key => {
key = (/\-/.test(key)) ? `'${key}'` : key
return `${key}: ${parseDetail(data[key], data, key).replace(/\n/g, '\n\t')}`
const _key = (/\-/.test(key)) ? `'${key}'` : key
return `${_key}: ${parseDetail(data[key], data, key).replace(/\n/g, '\n\t')}`
}).join('\n\t')}\n}`
}
}