WBE_Praktikum_4/jasmine_demo/lib/parse-to-proto.js

7 lines
139 B
JavaScript

function parseToProto(json, proto){
return Object.assign(Object.create(proto), JSON.parse(json))
}
module.exports = { parseToProto}