修复特殊key的bug
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ini-decode",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "typing/index.d.ts",
|
||||
|
@ -74,6 +74,7 @@ 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')}`
|
||||
}).join('\n\t')}\n}`
|
||||
}
|
||||
|
Reference in New Issue
Block a user