Title

Global

Methods

# GetFileType(Filename) → {string}

Get content type of the file name for http header.

Parameters:
Name Type Description
Filename string

Filename to get header content type.

View Source GetFileType/index.js, line 15

Filetype

string
Example
const { GetFileType } = require("lite-web-server")
var filetype = GetFileType("main.js")

# SafeUrl(stringopt) → {string}

removes /.. from url.

Parameters:
Name Type Attributes Description
string URL <optional>

View Source util/safe-url.js, line 10

  • URL
string
Example

Simple example

const { SafeUrl } = require("lite-web-server");