mirror of
https://github.com/denoland/deno.git
synced 2024-11-01 09:24:20 -04:00
11 lines
386 B
JavaScript
11 lines
386 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.prettyJSON = void 0;
|
|
const prettyJSON = (options = { space: 2 }) => {
|
|
return async (c, next) => {
|
|
const pretty = c.req.query('pretty') || c.req.query('pretty') === '' ? true : false;
|
|
c.pretty(pretty, options.space);
|
|
await next();
|
|
};
|
|
};
|
|
exports.prettyJSON = prettyJSON;
|