error-serializer.js — fastify Source File
Architecture documentation for error-serializer.js, a javascript file in the fastify codebase.
Entity Profile
Source Code
// This file is autogenerated by build/build-error-serializer.js, do not edit
/* c8 ignore start */
'use strict'
const Serializer = require('fast-json-stringify/lib/serializer')
const serializerState = {"mode":"standalone"}
const serializer = Serializer.restoreFromState(serializerState)
const validator = null
module.exports = function anonymous(validator,serializer
) {
const {
asString,
asNumber,
asBoolean,
asDateTime,
asDate,
asTime,
asUnsafeString
} = serializer
const asInteger = serializer.asInteger.bind(serializer)
const JSON_STR_BEGIN_OBJECT = '{'
const JSON_STR_END_OBJECT = '}'
const JSON_STR_BEGIN_ARRAY = '['
const JSON_STR_END_ARRAY = ']'
const JSON_STR_COMMA = ','
const JSON_STR_COLONS = ':'
const JSON_STR_QUOTE = '"'
const JSON_STR_EMPTY_OBJECT = JSON_STR_BEGIN_OBJECT + JSON_STR_END_OBJECT
const JSON_STR_EMPTY_ARRAY = JSON_STR_BEGIN_ARRAY + JSON_STR_END_ARRAY
const JSON_STR_EMPTY_STRING = JSON_STR_QUOTE + JSON_STR_QUOTE
const JSON_STR_NULL = 'null'
// #
function anonymous0 (input) {
const obj = (input && typeof input.toJSON === 'function')
? input.toJSON()
: input
if (obj === null) return JSON_STR_EMPTY_OBJECT
let value
let json = JSON_STR_BEGIN_OBJECT
let addComma = false
value = obj["statusCode"]
if (value !== undefined) {
!addComma && (addComma = true) || (json += JSON_STR_COMMA)
json += "\"statusCode\":"
json += asNumber(value)
// ... (75 more lines)
Source
Frequently Asked Questions
What does error-serializer.js do?
error-serializer.js is a source file in the fastify codebase, written in javascript.
Where is error-serializer.js in the architecture?
error-serializer.js is located at lib/error-serializer.js (directory: lib).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free