Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function (schema) {
if (typeof schema === 'string') schema = JSON.parse(schema)
var result = {
syntax: 2,
package: null,
enums: [],
messages: []
}
if (schema.type === 'object') {
result.messages.push(Message(schema))
}
return protobuf.stringify(result)
}
Messages.prototype.toString = function () {
return schema.stringify(sch)
}