7 lines
139 B
JavaScript
7 lines
139 B
JavaScript
|
function parseToProto(json, proto){
|
||
|
return Object.assign(Object.create(proto), JSON.parse(json))
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
module.exports = { parseToProto}
|