UNPKG

openapi3-generator

Version:

Use your API OpenAPI 3 definition to generate code, documentation, and literally anything you need.

12 lines (9 loc) 299 B
const Handlebars = require('handlebars'); Handlebars.registerHelper('equal', (lvalue, rvalue, options) => { if (arguments.length < 3) throw new Error('Handlebars Helper equal needs 2 parameters'); if (lvalue!==rvalue) { return options.inverse(this); } return options.fn(this); });