10 lines
279 B
JavaScript
Executable file
10 lines
279 B
JavaScript
Executable file
import { processNbtMessage } from 'prismarine-chat'
|
|
export default function parse (data) {
|
|
if (typeof data.type === 'string') {
|
|
return JSON.parse(processNbtMessage(data))
|
|
} else if (typeof data === 'string') {
|
|
return JSON.parse(data)
|
|
} else {
|
|
return data
|
|
}
|
|
}
|