rs-reverse/utils/unescape.js
2024-01-03 00:37:02 +08:00

13 lines
210 B
JavaScript

// 转译还原
module.exports = function(text) {
try {
try {
return JSON.parse('"' + text + '"')
} catch (e) {
return eval('("' + text + '")')
}
} catch (e) {
return text
}
}