UNPKG

noide

Version:

Web Editor built on hapi and nes websockets using browserify, superviews.js, bootstrap and the ACE editor.

18 lines (16 loc) 425 B
var Boom = require('boom') var standardize = require('standard-format') module.exports = { method: 'POST', path: '/standard-format', config: { handler: function (request, reply) { try { var standardized = standardize.transform(request.payload.value) return reply(standardized) } catch (e) { return reply(Boom.badRequest('standard-format threw an error', e)) } } } }