Introduced in 4.0.0

Stability: 2 - Stable

const Parser = require('kado/lib/Parser')

The Parser library provides parsing methods for various formats in order to save time and ensure a proper and secure parse.

Class: Parser

static Parser.lineToObject(input, options)

Available Options

static Parser.cookie(input)

static Parser.queryString(input)

static Parser.replacer(map, input)

static Parser.htmlEscape(input)

static Parser.htmlUnescape(input)

static Parser.capitalize(string)

This Method Makes The Input Look Like This.

static Parser.printDate (d, emptyString)

Reformat date to a string with a nice format; such as: YYYY-mm-dd HH:MM:SS

static Parser.escapeAndTruncate()

static Parser.stringCaseSeparate(input, separator)

static Parser.stringToPath(input, separator)

static Parser.stringToTitle(name, separator)

static Parser.requestBody(req)


app.use(req => Parser.requestBody(req))